When retry faults are disabled (amdgpu.noretry=1),
we should program the RETRY_PERMISSION_OR_INVALID_PAGE_FAULT
bit to zero.

Note that retry faults are enabled by default on GFX12.1
so this just fixes the case when they are explicitly disabled.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Christian König <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
index 15d2a8ec55a6..7fa451b373fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
@@ -436,7 +436,7 @@ static void gfxhub_v12_1_xcc_setup_vmid_config(struct 
amdgpu_device *adev,
                        /* Send no-retry XNACK on fault to suppress VM fault 
storm */
                        tmp = REG_SET_FIELD(tmp, GCVM_CONTEXT1_CNTL,
                                            
RETRY_PERMISSION_OR_INVALID_PAGE_FAULT,
-                                           1);
+                                           !adev->gmc.noretry);
                        WREG32_SOC15_OFFSET(GC, GET_INST(GC, j), 
regGCVM_CONTEXT1_CNTL,
                                            i * hub->ctx_distance, tmp);
                        WREG32_SOC15_OFFSET(GC, GET_INST(GC, j),
-- 
2.55.0

Reply via email to