[Intel-gfx] [PATCH 2/2] drm/i915/gt: Save/restore interrupts around breadcrumb disable
Mika Kuoppala
mika.kuoppala at linux.intel.com
Tue Aug 13 14:50:03 UTC 2019
Chris Wilson <chris at chris-wilson.co.uk> writes:
> 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: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
perf timer, drop ref, engine_unpark, disable_breadcrumbs
with irqs off.
Well, the trace on previous patch makes it clear,
for those who know the code...I had to read.
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_breadcrumbs.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
> index 15bbdd8c7552..2bc9c460e78d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_breadcrumbs.c
> @@ -67,14 +67,15 @@ static void __intel_breadcrumbs_disarm_irq(struct intel_breadcrumbs *b)
> void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine)
> {
> struct intel_breadcrumbs *b = &engine->breadcrumbs;
> + unsigned long flags;
>
> if (!b->irq_armed)
> return;
>
> - spin_lock_irq(&b->irq_lock);
> + spin_lock_irqsave(&b->irq_lock, flags);
> if (b->irq_armed)
> __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)
> --
> 2.23.0.rc1
More information about the Intel-gfx
mailing list