Commit ec49857a authored by Matthew Brost's avatar Matthew Brost
Browse files

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: bce13d6e ("drm/gpusvm, drm/xe: Allow mixed mappings for userptr")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarFrancois Dugast <francois.dugast@intel.com>
Link: https://patch.msgid.link/20260130194928.3255613-3-matthew.brost@intel.com
parent 556dba95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,7 @@ int drm_gpusvm_get_pages(struct drm_gpusvm *gpusvm,
			}
			zdd = page->zone_device_data;
			if (pagemap != page_pgmap(page)) {
				if (i > 0) {
				if (pagemap) {
					err = -EOPNOTSUPP;
					goto err_unmap;
				}