Commit a4b2ba8f authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/gfx10: fix kiq locking in KCQ reset



The ring test needs to be inside the lock.

Fixes: 097af47d ("drm/amdgpu/gfx10: wait for reset done before remap")
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Jiadong Zhu <Jiadong.Zhu@amd.com>
parent 08f116c5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -9625,9 +9625,8 @@ static int gfx_v10_0_reset_kcq(struct amdgpu_ring *ring,
	kiq->pmf->kiq_unmap_queues(kiq_ring, ring, RESET_QUEUES,
				   0, 0);
	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)
		return r;

@@ -9663,9 +9662,8 @@ static int gfx_v10_0_reset_kcq(struct amdgpu_ring *ring,
	}
	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)
		return r;