drm/amdgpu/gfx11: use rlc safe mode for soft recovery
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:44:18 +0000 (02:44 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:44:18 +0000 (02:44 +0000)
From Alex Deucher
c20cd3d6d26156efbd3ec5b3fb17fae8237eb94b in linux-6.6.y/6.6.55
3f2d35c325534c1b7ac5072173f0dc7ca969dec2 in mainline linux

sys/dev/pci/drm/amd/amdgpu/gfx_v11_0.c

index 2fe7ed4..5599d90 100644 (file)
@@ -5701,7 +5701,9 @@ static void gfx_v11_0_ring_soft_recovery(struct amdgpu_ring *ring,
        value = REG_SET_FIELD(value, SQ_CMD, MODE, 0x01);
        value = REG_SET_FIELD(value, SQ_CMD, CHECK_VMID, 1);
        value = REG_SET_FIELD(value, SQ_CMD, VM_ID, vmid);
+       amdgpu_gfx_rlc_enter_safe_mode(adev, 0);
        WREG32_SOC15(GC, 0, regSQ_CMD, value);
+       amdgpu_gfx_rlc_exit_safe_mode(adev, 0);
 }
 
 static void