From: Alex Deucher Date: Mon, 7 Jul 2025 13:42:23 +0000 (-0400) Subject: drm/amdgpu/gfx9.4.3: fix kiq locking in KCQ reset X-Git-Tag: v6.12.42~255 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6db9f958b43f1b5f64e20117b6c4862ad3cc2b15;p=thirdparty%2Fkernel%2Fstable.git drm/amdgpu/gfx9.4.3: fix kiq locking in KCQ reset [ Upstream commit 08f116c59310728ea8b7e9dc3086569006c861cf ] The ring test needs to be inside the lock. Fixes: 4c953e53cc34 ("drm/amdgpu/gfx_9.4.3: wait for reset done before remap") Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: Jiadong Zhu Signed-off-by: Sasha Levin --- 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 5dc3454d7d361..f27ccb8f3c8c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -3640,9 +3640,8 @@ pipe_reset: } kiq->pmf->kiq_map_queues(kiq_ring, ring); amdgpu_ring_commit(kiq_ring); - spin_unlock_irqrestore(&kiq->ring_lock, flags); - r = amdgpu_ring_test_ring(kiq_ring); + spin_unlock_irqrestore(&kiq->ring_lock, flags); if (r) { dev_err(adev->dev, "fail to remap queue\n"); return r;