From c00116825f2bfd7a7751549f3589c430ee37653e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Fri, 28 Aug 2026 13:41:11 +0200 Subject: [PATCH] drm/amdgpu/vm: Use init PTE flags in amdgpu_vm_handle_fault() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PTE_IS_PTE seems necessary for handling retry faults on GFX12. For reference see: amdgpu_vm_pte_update_flags() that explains the problem svm_range_get_pte_flags() that uses the flag on GFX12 Signed-off-by: Timur Kristóf Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 4dc6d1dc406c..2e6ee19bcfd6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -3053,7 +3053,8 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid, } addr /= AMDGPU_GPU_PAGE_SIZE; - flags = AMDGPU_PTE_VALID | AMDGPU_PTE_SNOOPED | + flags = adev->gmc.init_pte_flags | + AMDGPU_PTE_VALID | AMDGPU_PTE_SNOOPED | AMDGPU_PTE_SYSTEM; if (is_compute_context) { @@ -3066,8 +3067,7 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid, /* Redirect the access to the dummy page */ value = adev->dummy_page_addr; flags |= AMDGPU_PTE_EXECUTABLE | AMDGPU_PTE_READABLE | - AMDGPU_PTE_WRITEABLE; - + AMDGPU_PTE_WRITEABLE; } else { /* Let the hw retry silently on the PTE */ value = 0;