Skip to content

Commit

Permalink
drm/i915/guc: Use correct context lock when callig clr_context_regist…
Browse files Browse the repository at this point in the history
…ered

s/ce/cn/ when grabbing guc_state.lock before calling
clr_context_registered.

Fixes: 0f79765 ("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 b25db8c)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
Matthew Brost authored and Jani Nikula committed Dec 20, 2021
1 parent a7904a5 commit 64d16ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 64d16ac

Please sign in to comment.