On 2026-11-13 08:40, Shahyan Soltani wrote:
Previously, the root pt was never cleared after setting vm->is_npa =
true within amdgpu_vm_make_npa(). This resulted in the flag
adev->gmc.no_retry_flags to never be applied for the NPA VMs.
Call amdgpu_vm_pt_clear() after vm->is_npa = true is set and the bo has
been pinned/validated. This allows the root PT of the NPA VM to be cleared
with the correct value.
Remove the redundant second setting of vm->is_npa = true.
Suggested-by: Christian König<[email protected]>
Signed-off-by: Shahyan Soltani<[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 94b1cfe05e3e..bc5d4bfdd424 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2829,11 +2829,12 @@ int amdgpu_vm_make_npa(struct amdgpu_device *adev,
struct amdgpu_vm *vm)
if (r)
return r;
r = amdgpu_bo_pin(vm->root.bo, AMDGPU_GEM_DOMAIN_VRAM);
+ if (!r)
+ r = amdgpu_vm_pt_clear(adev, vm, to_amdgpu_bo_vm(vm->root.bo),
false);
Here we should flush TLB, so no stale translation is left behind from a
previous page table.
amdgpu_ualink_flush_tlb(adev, TLB_FLUSH_HEAVYWEIGHT);
Regards,
Philip
amdgpu_bo_unreserve(vm->root.bo);
if (r)
return r;
- vm->is_npa = true;
vm->need_tlb_fence = false;
return 0;