From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Call synchronize_irq() after resetting the GPU
Date: Fri, 30 Sep 2016 11:26:55 +0300 [thread overview]
Message-ID: <8737kh6be8.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20160930075032.30967-2-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> When we reset the GPU, we want to reinitialise it from a known step. In
> order to do so, we have to flush any pending operations from the irq
> handler and its tasklets. Add a missing synchronize_irq().
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 1418c1c522cb..d037da8ea449 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2581,8 +2581,6 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
> struct i915_gem_context *incomplete_ctx;
> bool ring_hung;
>
> - /* Ensure irq handler finishes, and not run again. */
> - tasklet_kill(&engine->irq_tasklet);
> if (engine->irq_seqno_barrier)
> engine->irq_seqno_barrier(engine);
>
> @@ -2624,6 +2622,11 @@ void i915_gem_reset(struct drm_i915_private *dev_priv)
>
> i915_gem_retire_requests(dev_priv);
>
> + /* Ensure irq handler finishes, and not run again. */
> + synchronize_irq(dev_priv->drm.irq);
> + for_each_engine(engine, dev_priv)
> + tasklet_kill(&engine->irq_tasklet);
> +
But you still might get one tasklet run if there was interrupt pending,
post reset?
How about this kind of ordering:
engine->disable_irq();
synchronize_irq();
tasklet_kill(engine);
intel_gpu_reset();
i915_gem_reset();
Perhaps I am paranoid but I want to guarantee the frozen state
before we hit the reset button.
-Mika
> for_each_engine(engine, dev_priv)
> i915_gem_reset_engine(engine);
>
> --
> 2.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-09-30 8:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-30 7:50 [PATCH 1/3] drm/i915/execlists: Reinitialise context image after GPU hang Chris Wilson
2016-09-30 7:50 ` [PATCH 2/3] drm/i915: Call synchronize_irq() after resetting the GPU Chris Wilson
2016-09-30 8:26 ` Mika Kuoppala [this message]
2016-09-30 8:38 ` Chris Wilson
2016-09-30 11:25 ` [PATCH] drm/i915: Disable irqs across GPU reset Chris Wilson
2016-10-03 12:42 ` Mika Kuoppala
2016-09-30 7:50 ` [PATCH 3/3] drm/i915: Show RING registers through debugfs Chris Wilson
2016-09-30 8:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] drm/i915/execlists: Reinitialise context image after GPU hang Patchwork
2016-09-30 13:18 ` ✗ Fi.CI.BAT: warning for series starting with [1/3] drm/i915/execlists: Reinitialise context image after GPU hang (rev2) Patchwork
2016-10-03 12:25 ` [PATCH 1/3] drm/i915/execlists: Reinitialise context image after GPU hang Mika Kuoppala
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=8737kh6be8.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.