Intel-GFX Archive on 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] drm/i915/execlists: Relax assertion for a pinned context image on reset
Date: Mon, 23 Sep 2019 12:52:14 +0300	[thread overview]
Message-ID: <87r247z6ep.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190923080038.30729-1-chris@chris-wilson.co.uk>

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

> A gpu hang can occur at any time, given a sufficiently angry gpu. An
> example is when it forgets to perform a context-switch at the end of a
> request, leaving us with a hanging GPU on a completed request. Here, we
> may retire the request, only leaving its context alive via the active
> barrier. When we reset the GPU on a completed request, we do not modify
> its context image (just updating the ring state) and can safely defer
> the assertion that we have the image pinned and ready to modify.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111639
> Fixes: dffa8feb3084 ("drm/i915/perf: Assert locking for i915_init_oa_perf_state()")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 1a2b71157f08..80ded99bcb15 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -2383,7 +2383,6 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
>  	GEM_BUG_ON(!i915_vma_is_pinned(ce->state));
>  
>  	/* Proclaim we have exclusive access to the context image! */
> -	GEM_BUG_ON(!intel_context_is_pinned(ce));
>  	mutex_acquire(&ce->pin_mutex.dep_map, 2, 0, _THIS_IP_);
>  
>  	rq = active_request(rq);
> @@ -2432,6 +2431,7 @@ static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
>  	 * future request will be after userspace has had the opportunity
>  	 * to recreate its own state.
>  	 */
> +	GEM_BUG_ON(!intel_context_is_pinned(ce));
>  	regs = ce->lrc_reg_state;
>  	if (engine->pinned_default_state) {
>  		memcpy(regs, /* skip restoring the vanilla PPHWSP */
> -- 
> 2.23.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-23  9:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23  8:00 [PATCH] drm/i915/execlists: Relax assertion for a pinned context image on reset Chris Wilson
2019-09-23  9:52 ` Mika Kuoppala [this message]
2019-09-23 10:54 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-09-23 15:13 ` ✗ Fi.CI.IGT: failure " 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=87r247z6ep.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox