Skip to contentSkip to conversation

drm/nouveau: uvmm: fix unset region pointer on remap

PATCH In review Danilo Krummrich 2 participants 2 messages Aug 20, 2023 – Aug 21, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: uvmm: fix unset region pointer on remap

Transfer the region pointer of a uvma to the new uvma(s) on re-map to prevent potential shader faults when the re-mapped uvma(s) are unmapped.

---
 drivers/gpu/drm/nouveau/nouveau_uvmm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_uvmm.c +1 -0
index 3a1e8538f205..aae780e4a4aa 100644
@@ -639,6 +639,7 @@ nouveau_uvmm_sm_prepare(struct nouveau_uvmm *uvmm,
 			struct drm_gpuva *va = r->unmap->va;
 			struct uvmm_map_args remap_args = {
 				.kind = uvma_from_va(va)->kind,
+				.region = uvma_from_va(va)->region,
 			};
 			u64 ustart = va->va.addr;
 			u64 urange = va->va.range;

base-commit: 25205087df1ffe06ccea9302944ed1f77dc68c6f

Signature · 1 line
2.41.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Danilo Krummrich

Transfer the region pointer of a uvma to the new uvma(s) on re-map to prevent potential shader faults when the re-mapped uvma(s) are unmapped.

---
 drivers/gpu/drm/nouveau/nouveau_uvmm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_uvmm.c +1 -0
index 3a1e8538f205..aae780e4a4aa 100644
@@ -639,6 +639,7 @@ nouveau_uvmm_sm_prepare(struct nouveau_uvmm *uvmm,
                        struct drm_gpuva *va = r->unmap->va;
                        struct uvmm_map_args remap_args = {
                                .kind = uvma_from_va(va)->kind,
+                               .region = uvma_from_va(va)->region,
                        };
                        u64 ustart = va->va.addr;
                        u64 urange = va->va.range;

base-commit: 25205087df1ffe06ccea9302944ed1f77dc68c6f --
2.41.0