drm/amdgpu: use read-modify-write mode for gfx v9_4_3 SQ setting
authorTao Zhou <tao.zhou1@amd.com>
Fri, 25 Aug 2023 07:13:57 +0000 (15:13 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 31 Aug 2023 22:11:09 +0000 (18:11 -0400)
Instead of using direct update, avoid touching unrelated fields.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

index b4fdb26..f24a547 100644 (file)
@@ -4042,7 +4042,8 @@ static void gfx_v9_4_3_inst_enable_watchdog_timer(struct amdgpu_device *adev,
        uint32_t i;
        uint32_t data;
 
-       data = REG_SET_FIELD(0, SQ_TIMEOUT_CONFIG, TIMEOUT_FATAL_DISABLE,
+       data = RREG32_SOC15(GC, GET_INST(GC, 0), regSQ_TIMEOUT_CONFIG);
+       data = REG_SET_FIELD(data, SQ_TIMEOUT_CONFIG, TIMEOUT_FATAL_DISABLE,
                             amdgpu_watchdog_timer.timeout_fatal_disable ? 1 : 0);
 
        if (amdgpu_watchdog_timer.timeout_fatal_disable &&