]> 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)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 16 Dec 2021 03:09:20 +0000 (19:09 -0800)
s/ce/cn/ when grabbing guc_state.lock before calling
clr_context_registered.

Fixes: 95fce41fd51ea ("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
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

index 97311119da6f9a5c9a46b6621da01c91e20bae51..09f8a287e9e73ae931180c1e900b4c23d653bb01 100644 (file)
@@ -1937,9 +1937,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);