Skip to content

Commit 01d0552

Browse files
committed
drm/amdgpu/gfx11: use proper rlc safe mode helpers
Rather than open coding it for the queue reset. Acked-by: Vitaly Prosyak <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent bcee4c3 commit 01d0552

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4781,7 +4781,7 @@ static int gfx_v11_0_soft_reset(void *handle)
47814781
int r, i, j, k;
47824782
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
47834783

4784-
gfx_v11_0_set_safe_mode(adev, 0);
4784+
amdgpu_gfx_rlc_enter_safe_mode(adev, 0);
47854785

47864786
tmp = RREG32_SOC15(GC, 0, regCP_INT_CNTL);
47874787
tmp = REG_SET_FIELD(tmp, CP_INT_CNTL, CMP_BUSY_INT_ENABLE, 0);
@@ -4900,7 +4900,7 @@ static int gfx_v11_0_soft_reset(void *handle)
49004900
tmp = REG_SET_FIELD(tmp, CP_INT_CNTL, GFX_IDLE_INT_ENABLE, 1);
49014901
WREG32_SOC15(GC, 0, regCP_INT_CNTL, tmp);
49024902

4903-
gfx_v11_0_unset_safe_mode(adev, 0);
4903+
amdgpu_gfx_rlc_exit_safe_mode(adev, 0);
49044904

49054905
return gfx_v11_0_cp_resume(adev);
49064906
}
@@ -6590,7 +6590,7 @@ static int gfx_v11_0_reset_kcq(struct amdgpu_ring *ring, unsigned int vmid)
65906590
if (amdgpu_sriov_vf(adev))
65916591
return -EINVAL;
65926592

6593-
gfx_v11_0_set_safe_mode(adev, 0);
6593+
amdgpu_gfx_rlc_enter_safe_mode(adev, 0);
65946594
mutex_lock(&adev->srbm_mutex);
65956595
soc21_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
65966596
WREG32_SOC15(GC, 0, regCP_HQD_DEQUEUE_REQUEST, 0x2);
@@ -6606,7 +6606,7 @@ static int gfx_v11_0_reset_kcq(struct amdgpu_ring *ring, unsigned int vmid)
66066606
r = -ETIMEDOUT;
66076607
soc21_grbm_select(adev, 0, 0, 0, 0);
66086608
mutex_unlock(&adev->srbm_mutex);
6609-
gfx_v11_0_unset_safe_mode(adev, 0);
6609+
amdgpu_gfx_rlc_exit_safe_mode(adev, 0);
66106610
if (r) {
66116611
dev_err(adev->dev, "fail to wait on hqd deactivate\n");
66126612
return r;

0 commit comments

Comments
 (0)