From: Colin Ian King Date: Fri, 24 Apr 2020 12:56:40 +0000 (+0100) Subject: drm/amdgpu/gmc: Use consistent variable on unlocks X-Git-Tag: v5.10.7~2352^2~19^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abb17b1edf7bd1eacb78b6862039e965cb442947;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu/gmc: Use consistent variable on unlocks Currently the error returns paths are unlocking lock kiq->ring_lock however it seems this should be dev->gfx.kiq.ring_lock as this is the lock that is being locked and unlocked around the ring operations. This looks like a bug, but it's not. The kiq is just a local variable pointing to the same structure. Make it consistent. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index cd67aad..eff25c7 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c @@ -429,7 +429,7 @@ static int gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, r = amdgpu_fence_emit_polling(ring, &seq, MAX_KIQ_REG_WAIT); if (r) { amdgpu_ring_undo(ring); - spin_unlock(&kiq->ring_lock); + spin_unlock(&adev->gfx.kiq.ring_lock); return -ETIME; } diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 0a60263..055ecba 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -624,7 +624,7 @@ static int gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev, r = amdgpu_fence_emit_polling(ring, &seq, MAX_KIQ_REG_WAIT); if (r) { amdgpu_ring_undo(ring); - spin_unlock(&kiq->ring_lock); + spin_unlock(&adev->gfx.kiq.ring_lock); return -ETIME; }