drm/amdgpu: unlock the correct lock in amdgpu_gfx_enable_kcq()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 3 May 2023 15:09:18 +0000 (18:09 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:31:46 +0000 (09:31 -0400)
We changed which lock we are supposed to take but this error path
was accidentally over looked so it still drops the old lock.

Fixes: def799c6596d ("drm/amdgpu: add multi-xcc support to amdgpu_gfx interfaces (v4)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

index b91be56..76dd284 100644 (file)
@@ -605,7 +605,7 @@ int amdgpu_gfx_enable_kcq(struct amdgpu_device *adev, int xcc_id)
                                                kiq->pmf->set_resources_size);
                if (r) {
                        DRM_ERROR("Failed to lock KIQ (%d).\n", r);
-                       spin_unlock(&adev->gfx.kiq[0].ring_lock);
+                       spin_unlock(&kiq->ring_lock);
                        return r;
                }