Skip to content

Commit a4b2ba8

Browse files
committed
drm/amdgpu/gfx10: fix kiq locking in KCQ reset
The ring test needs to be inside the lock. Fixes: 097af47 ("drm/amdgpu/gfx10: wait for reset done before remap") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Jiadong Zhu <Jiadong.Zhu@amd.com>
1 parent 08f116c commit a4b2ba8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9625,9 +9625,8 @@ static int gfx_v10_0_reset_kcq(struct amdgpu_ring *ring,
96259625
kiq->pmf->kiq_unmap_queues(kiq_ring, ring, RESET_QUEUES,
96269626
0, 0);
96279627
amdgpu_ring_commit(kiq_ring);
9628-
spin_unlock_irqrestore(&kiq->ring_lock, flags);
9629-
96309628
r = amdgpu_ring_test_ring(kiq_ring);
9629+
spin_unlock_irqrestore(&kiq->ring_lock, flags);
96319630
if (r)
96329631
return r;
96339632

@@ -9663,9 +9662,8 @@ static int gfx_v10_0_reset_kcq(struct amdgpu_ring *ring,
96639662
}
96649663
kiq->pmf->kiq_map_queues(kiq_ring, ring);
96659664
amdgpu_ring_commit(kiq_ring);
9666-
spin_unlock_irqrestore(&kiq->ring_lock, flags);
9667-
96689665
r = amdgpu_ring_test_ring(kiq_ring);
9666+
spin_unlock_irqrestore(&kiq->ring_lock, flags);
96699667
if (r)
96709668
return r;
96719669

0 commit comments

Comments
 (0)