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

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

index b5e2c6a..32ecdae 100644 (file)
@@ -5709,7 +5709,9 @@ static void gfx_v9_0_ring_soft_recovery(struct amdgpu_ring *ring, unsigned vmid)
        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 gfx_v9_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,