]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/guc: Use correct context lock when callig clr_context_registered
authorMatthew Brost <matthew.brost@intel.com>
Tue, 14 Dec 2021 17:04:54 +0000 (09:04 -0800)
committerJani Nikula <jani.nikula@intel.com>
Mon, 20 Dec 2021 11:59:31 +0000 (13:59 +0200)
s/ce/cn/ when grabbing guc_state.lock before calling
clr_context_registered.

Fixes: dd0b021b930f8 ("drm/i915/guc: Rework and simplify locking")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211214170500.28569-2-matthew.brost@intel.com
(cherry picked from commit b25db8c782ad7ae80d4cea2a09c222f4f8980bb9)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

index c48557dfa04c4a73ef2dbdb51134722fe0b40142..c50039a5ba1e6b70beb797f84cee55b5da8cd4a4 100644 (file)
@@ -1664,9 +1664,9 @@ static int steal_guc_id(struct intel_guc *guc, struct intel_context *ce)
                list_del_init(&cn->guc_id.link);
                ce->guc_id = cn->guc_id;
 
-               spin_lock(&ce->guc_state.lock);
+               spin_lock(&cn->guc_state.lock);
                clr_context_registered(cn);
-               spin_unlock(&ce->guc_state.lock);
+               spin_unlock(&cn->guc_state.lock);
 
                set_context_guc_id_invalid(cn);