]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe: Introduce xe_vma_op_prefetch_range struct for prefetch of ranges
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Tue, 13 May 2025 04:02:14 +0000 (09:32 +0530)
committerHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 14 May 2025 13:55:53 +0000 (19:25 +0530)
Add xe_vma_op_prefetch_range struct for svm ranges prefetching, including
an xarray of SVM range pointers, range count, and target memory region.

-v2: Fix doc

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-2-himal.prasad.ghimiray@intel.com
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drivers/gpu/drm/xe/xe_vm_types.h

index 1662604c4486d667c6c5b148bcfc06f3f903bfc8..0afd0296a57e9a0bbf317dcbc01082bc7bbc1301 100644 (file)
@@ -374,6 +374,16 @@ struct xe_vma_op_unmap_range {
        struct xe_svm_range *range;
 };
 
+/** struct xe_vma_op_prefetch_range - VMA prefetch range operation */
+struct xe_vma_op_prefetch_range {
+       /** @range: xarray for SVM ranges data */
+       struct xarray range;
+       /** @ranges_count: number of svm ranges to map */
+       u32 ranges_count;
+       /** @region: memory region to prefetch to */
+       u32 region;
+};
+
 /** enum xe_vma_op_flags - flags for VMA operation */
 enum xe_vma_op_flags {
        /** @XE_VMA_OP_COMMITTED: VMA operation committed */
@@ -416,6 +426,8 @@ struct xe_vma_op {
                struct xe_vma_op_map_range map_range;
                /** @unmap_range: VMA unmap range operation specific data */
                struct xe_vma_op_unmap_range unmap_range;
+               /** @prefetch_range: VMA prefetch range operation specific data */
+               struct xe_vma_op_prefetch_range prefetch_range;
        };
 };