Skip to content

Commit bd1d1b4

Browse files
committed
drm/xe/vm: Add an identifier in xe_vma_ops for svm prefetch
Add a flag in xe_vma_ops to determine whether it has svm prefetch ops or not. v2: - s/false/0 (Matthew Brost) v3: - s/XE_VMA_OPS_HAS_SVM_PREFETCH/XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://lore.kernel.org/r/20250513040228.470682-8-himal.prasad.ghimiray@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
1 parent 34ebb62 commit bd1d1b4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3240,6 +3240,7 @@ static void xe_vma_ops_init(struct xe_vma_ops *vops, struct xe_vm *vm,
32403240
vops->q = q;
32413241
vops->syncs = syncs;
32423242
vops->num_syncs = num_syncs;
3243+
vops->flags = 0;
32433244
}
32443245

32453246
static int xe_vm_bind_ioctl_validate_bo(struct xe_device *xe, struct xe_bo *bo,

drivers/gpu/drm/xe/xe_vm_types.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ struct xe_vma_ops {
445445
u32 num_syncs;
446446
/** @pt_update_ops: page table update operations */
447447
struct xe_vm_pgtable_update_ops pt_update_ops[XE_MAX_TILES_PER_DEVICE];
448+
/** @flag: signify the properties within xe_vma_ops*/
449+
#define XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH BIT(0)
450+
u32 flags;
448451
#ifdef TEST_VM_OPS_ERROR
449452
/** @inject_error: inject error to test error handling */
450453
bool inject_error;

0 commit comments

Comments
 (0)