]> Gentwo Git Trees - linux/.git/commit
drm/gpusvm, drm/xe: Allow mixed mappings for userptr
authorMatthew Brost <matthew.brost@intel.com>
Wed, 15 Oct 2025 12:03:20 +0000 (14:03 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Fri, 17 Oct 2025 08:25:27 +0000 (10:25 +0200)
commitbce13d6ecd6c0e6c3376ac53617b30d19ce2a5c6
tree35b35e94b07e5cd82c56bad1868ad0bc0bda51ff
parent95af8155746cbbc9e97ceb16a4977c095da1eb40
drm/gpusvm, drm/xe: Allow mixed mappings for userptr

Compute kernels often issue memory copies immediately after completion.
If the memory being copied is an SVM pointer that was faulted into the
device and then bound via userptr, it is undesirable to move that
memory. Worse, if userptr is mixed between system and device memory, the
bind operation may be rejected.

Xe already has the necessary plumbing to support userptr with mixed
mappings. This update modifies GPUSVM's get_pages to correctly locate
pages in such mixed mapping scenarios.

v2:
- Rebase (Thomas Hellström)
v3:
- Remove Fixes tag.
v4:
- Break out from series since the other patch was merged.
- Update patch subject, ensure dri-devel and Maarten are CC'd.

Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://lore.kernel.org/r/20251015120320.176338-1-thomas.hellstrom@linux.intel.com
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/drm_gpusvm.c
drivers/gpu/drm/xe/xe_userptr.c
include/drm/drm_gpusvm.h