]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/vm: Add an identifier in xe_vma_ops for svm prefetch
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Tue, 13 May 2025 04:02:20 +0000 (09:32 +0530)
committerHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 14 May 2025 13:55:54 +0000 (19:25 +0530)
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>
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm_types.h

index f4382386b34c970e3174604905144b7a87bc81a5..21564ecf876573659a925e2ae70dce0e7a82068d 100644 (file)
@@ -3240,6 +3240,7 @@ static void xe_vma_ops_init(struct xe_vma_ops *vops, struct xe_vm *vm,
        vops->q = q;
        vops->syncs = syncs;
        vops->num_syncs = num_syncs;
+       vops->flags = 0;
 }
 
 static int xe_vm_bind_ioctl_validate_bo(struct xe_device *xe, struct xe_bo *bo,
index 0afd0296a57e9a0bbf317dcbc01082bc7bbc1301..bfc145baad496677626f6cb81f02cf5533adf10a 100644 (file)
@@ -445,6 +445,9 @@ struct xe_vma_ops {
        u32 num_syncs;
        /** @pt_update_ops: page table update operations */
        struct xe_vm_pgtable_update_ops pt_update_ops[XE_MAX_TILES_PER_DEVICE];
+       /** @flag: signify the properties within xe_vma_ops*/
+#define XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH BIT(0)
+       u32 flags;
 #ifdef TEST_VM_OPS_ERROR
        /** @inject_error: inject error to test error handling */
        bool inject_error;