From: Alex Deucher Date: Wed, 24 Jul 2024 22:04:44 +0000 (-0400) Subject: drm/amdgpu/gfx9.4.3: use proper rlc safe mode helpers X-Git-Tag: v6.12-rc1~126^2~17^2~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a48f31fb78265d992c75d45bea215998367d4956;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/gfx9.4.3: use proper rlc safe mode helpers Rather than open coding it for the queue reset. Acked-by: Vitaly Prosyak Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index 092e229f4097d..9215666a6318a 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -321,7 +321,7 @@ static void gfx_v9_4_3_kiq_reset_hw_queue(struct amdgpu_ring *kiq_ring, uint32_t unsigned i; /* enter save mode */ - gfx_v9_4_3_xcc_set_safe_mode(adev, xcc_id); + amdgpu_gfx_rlc_enter_safe_mode(adev, xcc_id); mutex_lock(&adev->srbm_mutex); soc15_grbm_select(adev, me_id, pipe_id, queue_id, 0, xcc_id); @@ -343,7 +343,7 @@ static void gfx_v9_4_3_kiq_reset_hw_queue(struct amdgpu_ring *kiq_ring, uint32_t soc15_grbm_select(adev, 0, 0, 0, 0, 0); mutex_unlock(&adev->srbm_mutex); /* exit safe mode */ - gfx_v9_4_3_xcc_unset_safe_mode(adev, xcc_id); + amdgpu_gfx_rlc_exit_safe_mode(adev, xcc_id); } static const struct kiq_pm4_funcs gfx_v9_4_3_kiq_pm4_funcs = { @@ -3495,7 +3495,7 @@ static int gfx_v9_4_3_reset_kcq(struct amdgpu_ring *ring, return r; /* make sure dequeue is complete*/ - gfx_v9_4_3_xcc_set_safe_mode(adev, ring->xcc_id); + amdgpu_gfx_rlc_enter_safe_mode(adev, ring->xcc_id); mutex_lock(&adev->srbm_mutex); soc15_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0, GET_INST(GC, ring->xcc_id)); for (i = 0; i < adev->usec_timeout; i++) { @@ -3507,7 +3507,7 @@ static int gfx_v9_4_3_reset_kcq(struct amdgpu_ring *ring, r = -ETIMEDOUT; soc15_grbm_select(adev, 0, 0, 0, 0, GET_INST(GC, ring->xcc_id)); mutex_unlock(&adev->srbm_mutex); - gfx_v9_4_3_xcc_unset_safe_mode(adev, ring->xcc_id); + amdgpu_gfx_rlc_exit_safe_mode(adev, ring->xcc_id); if (r) { dev_err(adev->dev, "fail to wait on hqd deactive\n"); return r;