Commit 2f87c053 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin

drm/i915/guc: Use correct lock for CT event handler

CT event handler is called under the gt->irq_lock from the interrupt
handling paths so make it the same from the init path. I don't think this
mismatch caused any functional issue but we need to wean the code of the
global i915->irq_lock.
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120095636.1987395-2-tvrtko.ursulin@linux.intel.com
parent 01666975
...@@ -203,7 +203,8 @@ static void guc_disable_interrupts(struct intel_guc *guc) ...@@ -203,7 +203,8 @@ static void guc_disable_interrupts(struct intel_guc *guc)
static int guc_enable_communication(struct intel_guc *guc) static int guc_enable_communication(struct intel_guc *guc)
{ {
struct drm_i915_private *i915 = guc_to_gt(guc)->i915; struct intel_gt *gt = guc_to_gt(guc);
struct drm_i915_private *i915 = gt->i915;
int ret; int ret;
GEM_BUG_ON(guc_communication_enabled(guc)); GEM_BUG_ON(guc_communication_enabled(guc));
...@@ -223,9 +224,9 @@ static int guc_enable_communication(struct intel_guc *guc) ...@@ -223,9 +224,9 @@ static int guc_enable_communication(struct intel_guc *guc)
guc_enable_interrupts(guc); guc_enable_interrupts(guc);
/* check for CT messages received before we enabled interrupts */ /* check for CT messages received before we enabled interrupts */
spin_lock_irq(&i915->irq_lock); spin_lock_irq(&gt->irq_lock);
intel_guc_ct_event_handler(&guc->ct); intel_guc_ct_event_handler(&guc->ct);
spin_unlock_irq(&i915->irq_lock); spin_unlock_irq(&gt->irq_lock);
drm_dbg(&i915->drm, "GuC communication enabled\n"); drm_dbg(&i915->drm, "GuC communication enabled\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment