Commit 3a0f1604 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Save/restore interrupts around breadcrumb disable

Stop assuming we only get called with irqs-on for disarming the
breadcrumbs, and do a full save/restore spin_lock_irq.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190813132916.20382-2-chris@chris-wilson.co.uk
parent a79ca656
...@@ -67,14 +67,15 @@ static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b) ...@@ -67,14 +67,15 @@ static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine) void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
{ {
struct intel_breadcrumbs *b = &engine->breadcrumbs; struct intel_breadcrumbs *b = &engine->breadcrumbs;
unsigned long flags;
if (!b->irq_armed) if (!b->irq_armed)
return; return;
spin_lock_irq(&b->irq_lock); spin_lock_irqsave(&b->irq_lock, flags);
if (b->irq_armed) if (b->irq_armed)
__intel_breadcrumbs_disarm_irq(b); __intel_breadcrumbs_disarm_irq(b);
spin_unlock_irq(&b->irq_lock); spin_unlock_irqrestore(&b->irq_lock, flags);
} }
static inline bool __request_completed(const struct i915_request *rq) static inline bool __request_completed(const struct i915_request *rq)
......
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