When retry faults are disabled (amdgpu.noretry=1),
the ENABLE_RETRY_FAULT_INTERRUPT bit should be programmed to 0.

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]>
---
 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 4c2fd1e6616e..d2edfe037da8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
@@ -243,7 +243,7 @@ static void 
gfxhub_v12_1_xcc_init_system_aperture_regs(struct amdgpu_device *ade
                tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL2,
                                    ACTIVE_PAGE_MIGRATION_PTE_READ_RETRY, 1);
                tmp = REG_SET_FIELD(tmp, GCVM_L2_PROTECTION_FAULT_CNTL2,
-                                   ENABLE_RETRY_FAULT_INTERRUPT, 0x1);
+                                   ENABLE_RETRY_FAULT_INTERRUPT, 
!adev->gmc.noretry);
                WREG32_SOC15(GC, GET_INST(GC, i),
                             regGCVM_L2_PROTECTION_FAULT_CNTL2, tmp);
        }
-- 
2.54.0

Reply via email to