]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/xe/svm: Implement prefetch support for SVM ranges
authorHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Tue, 13 May 2025 04:02:27 +0000 (09:32 +0530)
committerHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Wed, 14 May 2025 13:55:54 +0000 (19:25 +0530)
commit09ba0a8f06cd69d93eef0dc3bee33546880e46f8
tree69f3a5b84eb011534c2fe0277afcd7299dae9849
parentc904d4e2d73216c31487501b774afa9e3ed8be29
drm/xe/svm: Implement prefetch support for SVM ranges

This commit adds prefetch support for SVM ranges, utilizing the
existing ioctl vm_bind functionality to achieve this.

v2: rebase

v3:
   - use xa_for_each() instead of manual loop
   - check range is valid and in preferred location before adding to
     xarray
   - Fix naming conventions
   - Fix return condition as -ENODATA instead of -EAGAIN (Matthew Brost)
   - Handle sparsely populated cpu vma range (Matthew Brost)

v4:
   - fix end address to find next cpu vma in case of -ENOENT

v5:
   - Move find next vma logic to drm gpusvm layer
   - Avoid mixing declaration and logic

v6:
  - Use new function names
  - Move eviction logic to prefetch_ranges

v7:
  - devmem_only assigned 0
  - nit address

v8:
  - initialize ctx with 0

Cc: Matthew Brost <matthew.brost@intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250513040228.470682-15-himal.prasad.ghimiray@intel.com
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_vm.c