drm/amdgpu/gfx10: use rlc safe mode for soft recovery
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:45:38 +0000 (02:45 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:45:38 +0000 (02:45 +0000)
From Alex Deucher
4298813a43f72f6c8c71aa70a9e32b8fd0ad5f60 in linux-6.6.y/6.6.55
ead60e9c4e29c8574cae1be4fe3af1d9a978fb0f in mainline linux

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

index 699e182..8772e73 100644 (file)
@@ -8748,7 +8748,9 @@ static void gfx_v10_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, mmSQ_CMD, value);
+       amdgpu_gfx_rlc_exit_safe_mode(adev, 0);
 }
 
 static void