summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2026-01-30 11:49:28 -0800
committerMatthew Brost <matthew.brost@intel.com>2026-02-04 11:22:51 -0800
commitec49857ad181f2a68a3bea15422f2936ff366d47 (patch)
tree496d86a428881db45257069a70c7a7fa5119b1e0
parent556dba95473900073a6c03121361c11f646dc551 (diff)
drm/gpusvm: Allow device pages to be mapped in mixed mappings after system pages
The current code rejects device mappings whenever system pages have already been encountered. This is not the intended behavior when allow_mixed is set. Relax the restriction by permitting a single pagemap to be selected when allow_mixed is enabled, even if system pages were found earlier. Fixes: bce13d6ecd6c ("drm/gpusvm, drm/xe: Allow mixed mappings for userptr") Cc: stable@vger.kernel.org Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patch.msgid.link/20260130194928.3255613-3-matthew.brost@intel.com
-rw-r--r--drivers/gpu/drm/drm_gpusvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gpusvm.c b/drivers/gpu/drm/drm_gpusvm.c
index d733599ceb9a..871fcccd128a 100644
--- a/drivers/gpu/drm/drm_gpusvm.c
+++ b/drivers/gpu/drm/drm_gpusvm.c
@@ -1495,7 +1495,7 @@ map_pages:
}
zdd = page->zone_device_data;
if (pagemap != page_pgmap(page)) {
- if (i > 0) {
+ if (pagemap) {
err = -EOPNOTSUPP;
goto err_unmap;
}