]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu/gmc: Use consistent variable on unlocks
authorColin Ian King <colin.king@canonical.com>
Fri, 24 Apr 2020 12:56:40 +0000 (13:56 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 Apr 2020 15:42:11 +0000 (11:42 -0400)
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 <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index cd67aad3ae75a2c70832f573b190f4e653f8e63e..eff25c72c6c60900cc6b9b5a8f399298a321de6c 100644 (file)
@@ -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;
                }
 
index 0a602630834382c4160ac41ac27d584e7a72dd3b..055ecba754fff8b7f41700a76daef57102e2ba3b 100644 (file)
@@ -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;
                }