All of lore.kernel.org
 help / color / mirror / Atom feed
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/execlists: Push the tasklet kick after reset to reset_finish
Date: Thu, 14 Jun 2018 18:48:48 +0300	[thread overview]
Message-ID: <877en1weqn.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20180604073441.6737-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> In the unlikely case where we have failed to keep submitting to the GPU,
> we end up with the ELSP queue empty but a pending queue of requests.
> Here, we skip the per-engine reset as there is no guilty request, but in
> doing so we also skip the engine restart leaving ourselves with a
> permanently hung engine. A quick way to recover is by moving the tasklet
> kick to execlists_reset_finish() (from init_hw). We still emit the error
> on hanging, so the error is not lost but we should be able to recover.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@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 | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 8d912d0c8fc1..c8d9b5aed94a 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1803,7 +1803,6 @@ static bool unexpected_starting_state(struct intel_engine_cs *engine)
>  
>  static int gen8_init_common_ring(struct intel_engine_cs *engine)
>  {
> -	struct intel_engine_execlists * const execlists = &engine->execlists;
>  	int ret;
>  
>  	ret = intel_mocs_init_engine(engine);
> @@ -1821,10 +1820,6 @@ static int gen8_init_common_ring(struct intel_engine_cs *engine)
>  
>  	enable_execlists(engine);
>  
> -	/* After a GPU reset, we may have requests to replay */
> -	if (execlists->first)
> -		tasklet_schedule(&execlists->tasklet);
> -
>  	return 0;
>  }
>  
> @@ -2006,6 +2001,12 @@ static void execlists_reset(struct intel_engine_cs *engine,
>  
>  static void execlists_reset_finish(struct intel_engine_cs *engine)
>  {
> +	struct intel_engine_execlists * const execlists = &engine->execlists;
> +
> +	/* After a GPU reset, we may have requests to replay */
> +	if (execlists->first)
> +		tasklet_schedule(&execlists->tasklet);
> +
>  	/*
>  	 * Flush the tasklet while we still have the forcewake to be sure
>  	 * that it is not allowed to sleep before we restart and reload a
> @@ -2015,7 +2016,7 @@ static void execlists_reset_finish(struct intel_engine_cs *engine)
>  	 * serialising multiple attempts to reset so that we know that we
>  	 * are the only one manipulating tasklet state.
>  	 */
> -	__tasklet_enable_sync_once(&engine->execlists.tasklet);
> +	__tasklet_enable_sync_once(&execlists->tasklet);
>  
>  	GEM_TRACE("%s\n", engine->name);
>  }
> -- 
> 2.17.1
>
> _______________________________________________
> 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

  parent reply	other threads:[~2018-06-14 15:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-04  7:34 [PATCH 1/3] drm/i915/execlists: Remove synchronize_hardirq() Chris Wilson
2018-06-04  7:34 ` [PATCH 2/3] drm/i915/execlists: Push the tasklet kick after reset to reset_finish Chris Wilson
2018-06-04 15:17   ` Tvrtko Ursulin
2018-06-05  9:31     ` Chris Wilson
2018-06-14 15:48   ` Mika Kuoppala [this message]
2018-06-14 18:38     ` Chris Wilson
2018-06-04  7:34 ` [PATCH 3/3] drm/i915: Declare the driver wedged if hangcheck makes no progress Chris Wilson
2018-06-05  9:26   ` Mika Kuoppala
2018-06-05  9:33     ` Chris Wilson
2018-06-04  7:57 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/execlists: Remove synchronize_hardirq() Patchwork
2018-06-04  7:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-06-04  8:18 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-04  9:09 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-04 15:13 ` [PATCH 1/3] " Tvrtko Ursulin
2018-06-04 15:21   ` Chris Wilson

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=877en1weqn.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.