From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/execlists: Move irq state manipulation inside irq disabled region
Date: Fri, 02 Mar 2018 15:42:30 +0200 [thread overview]
Message-ID: <87lgfappa1.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180302131246.22036-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Although this state (execlists->active and engine->irq_posted) itself is
> not protected by the engine->timeline spinlock, it does conveniently
> ensure that irqs are disabled. We can use this to protect our
> manipulation of the state and so ensure that the next IRQ to arrive sees
> consistent state and (hopefully) ignores the reset engine.
>
> Suggested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index c1a3636e94fc..0482e54c94f0 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1618,10 +1618,10 @@ static void reset_common_ring(struct intel_engine_cs *engine,
> GEM_TRACE("%s seqno=%x\n",
> engine->name, request ? request->global_seqno : 0);
>
> - reset_irq(engine);
> -
> spin_lock_irqsave(&engine->timeline->lock, flags);
>
> + reset_irq(engine);
> +
> /*
> * Catch up with any missed context-switch interrupts.
> *
> @@ -1636,11 +1636,11 @@ static void reset_common_ring(struct intel_engine_cs *engine,
> /* Push back any incomplete requests for replay after the reset. */
> __unwind_incomplete_requests(engine);
>
> - spin_unlock_irqrestore(&engine->timeline->lock, flags);
> -
> /* Mark all CS interrupts as complete */
> execlists->active = 0;
>
> + spin_unlock_irqrestore(&engine->timeline->lock, flags);
> +
> /* If the request was innocent, we leave the request in the ELSP
> * and will try to replay it on restarting. The context image may
> * have been corrupted by the reset, in which case we may have
> --
> 2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-03-02 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 13:12 [PATCH] drm/i915/execlists: Move irq state manipulation inside irq disabled region Chris Wilson
2018-03-02 13:42 ` Mika Kuoppala [this message]
2018-03-02 13:53 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-03-02 13:53 ` [PATCH] " Chris Wilson
2018-03-02 15:47 ` ✓ Fi.CI.IGT: success for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgfappa1.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.