All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Confirm the context survives execution
Date: Wed, 14 Oct 2020 09:43:10 +0100	[thread overview]
Message-ID: <160266499092.7159.8106976190790917919@build.alporthouse.com> (raw)
In-Reply-To: <475985b5-8e4d-81f3-5f00-58eecbbdf865@linux.intel.com>

Quoting Tvrtko Ursulin (2020-10-14 09:36:08)
> 
> On 13/10/2020 16:35, Chris Wilson wrote:
> > Repeat our sanitychecks from before execution to after execution. One
> > expects that if we were to see these, the gpu would already be on fire,
> > but the timing may be informative.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   drivers/gpu/drm/i915/gt/intel_lrc.c | 10 +++++++---
> >   1 file changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > index 287537089c77..3dbdd5d0cb60 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> > @@ -1216,7 +1216,8 @@ static void intel_engine_context_out(struct intel_engine_cs *engine)
> >   
> >   static void
> >   execlists_check_context(const struct intel_context *ce,
> > -                     const struct intel_engine_cs *engine)
> > +                     const struct intel_engine_cs *engine,
> > +                     const char *when)
> >   {
> >       const struct intel_ring *ring = ce->ring;
> >       u32 *regs = ce->lrc_reg_state;
> > @@ -1251,7 +1252,7 @@ execlists_check_context(const struct intel_context *ce,
> >               valid = false;
> >       }
> >   
> > -     WARN_ONCE(!valid, "Invalid lrc state found before submission\n");
> > +     WARN_ONCE(!valid, "Invalid lrc state found %s submission\n", when);
> >   }
> >   
> >   static void restore_default_state(struct intel_context *ce,
> > @@ -1347,7 +1348,7 @@ __execlists_schedule_in(struct i915_request *rq)
> >               reset_active(rq, engine);
> >   
> >       if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> > -             execlists_check_context(ce, engine);
> > +             execlists_check_context(ce, engine, "before");
> >   
> >       if (ce->tag) {
> >               /* Use a fixed tag for OA and friends */
> > @@ -1418,6 +1419,9 @@ __execlists_schedule_out(struct i915_request *rq,
> >        * refrain from doing non-trivial work here.
> >        */
> >   
> > +     if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
> > +             execlists_check_context(ce, engine, "after");
> > +
> 
> CI failures here are either something super scary or a simple mistake 
> which I cannot see. Or is engine retire, possible queued up before, 
> racing with current schedule_out?

It's the unpark while the process_csb is not yet flushed, so we scrub
the kernel_context before it is scheduled-out. It could in theory be a
real problem with our scrubbing to simulate an issue causing an issue,
but the timing is quite slim.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-10-14  8:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 15:35 [Intel-gfx] [PATCH] drm/i915/gt: Confirm the context survives execution Chris Wilson
2020-10-13 16:20 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-10-14  8:36 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2020-10-14  8:43   ` Chris Wilson [this message]
2020-10-14  9:06     ` Tvrtko Ursulin
2020-10-14  9:09       ` Chris Wilson
2020-10-14  8:43 ` Chris Wilson
2020-10-15 15:15   ` Tvrtko Ursulin
2020-10-15 15:32   ` Tvrtko Ursulin
2020-10-14  9:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Confirm the context survives execution (rev2) Patchwork
2020-10-14 17:39 ` [Intel-gfx] ✗ 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=160266499092.7159.8106976190790917919@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.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.