All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH 2/2] drm/i915: Detect a failed GPU reset+recovery
Date: Mon, 16 Jan 2017 11:18:23 +0000	[thread overview]
Message-ID: <20170116111823.GF6680@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20170116094252.26429-2-chris@chris-wilson.co.uk>

On Mon, Jan 16, 2017 at 09:42:52AM +0000, Chris Wilson wrote:
> If we can't recover the GPU after the reset, mark it as wedged to cancel
> the outstanding tasks and to prevent new users from trying to use the
> broken GPU.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> -void i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
> +int i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
>  {
>  	struct intel_engine_cs *engine;
>  	enum intel_engine_id id;
> +	int err = 0;
>  
>  	/* Ensure irq handler finishes, and not run again. */
> -	for_each_engine(engine, dev_priv, id)
> +	for_each_engine(engine, dev_priv, id) {
> +		struct drm_i915_gem_request *request;
> +
>  		tasklet_kill(&engine->irq_tasklet);
>  
> +		request = i915_gem_find_active_request(engine);
> +		if (request && request->fence.error == -EIO)
> +			err = -EIO; /* Previous reset failed! */

This should check that it is this engine that is declared as hung - as
we may not have given the GPU the chance to even execute the requests
from the previous reset.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-16 11:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  9:42 [PATCH 1/2] drm/i915: Move engine reset preparation to i915_gem_reset_prepare() Chris Wilson
2017-01-16  9:42 ` [PATCH 2/2] drm/i915: Detect a failed GPU reset+recovery Chris Wilson
2017-01-16 11:18   ` Chris Wilson [this message]
2017-01-16 15:00   ` [PATCH] " Chris Wilson
2017-01-16 11:54 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Move engine reset preparation to i915_gem_reset_prepare() Patchwork
2017-01-16 14:03 ` [PATCH 1/2] " Mika Kuoppala
2017-01-16 14:18   ` Chris Wilson
2017-01-16 14:37     ` Mika Kuoppala
2017-01-16 15:54 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Move engine reset preparation to i915_gem_reset_prepare() (rev2) 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=20170116111823.GF6680@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@intel.com \
    /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.