All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH 1/3] drm/i915: Always sanity check engine state upon idling
Date: Tue, 29 Aug 2017 14:55:46 +0100	[thread overview]
Message-ID: <150401494622.8572.237082904881947819@mail.alporthouse.com> (raw)
In-Reply-To: <87val64hs6.fsf@gaia.fi.intel.com>

Quoting Mika Kuoppala (2017-08-29 14:36:57)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > When we do a locked idle we know that afterwards all requests have been
> > completed and the engines have been cleared of tasks. For whatever
> > reason, this doesn't always happen and we may go into a suspend with
> > ELSP still full, and this causes an issue upon resume as we get very,
> > very confused.
> >
> > If the engines refuse to idle, mark the device as wedged. In the process
> > we get rid of the maybe unused open-coded version of wait_for_engines
> > reported by Nick Desaulniers and Matthias Kaehlcke.
> >
> > References: https://bugs.freedesktop.org/show_bug.cgi?id=101891
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthias Kaehlcke <mka@chromium.org>
> 
> I noticed that when actually do switch to kernel context, it's
> async. And then we always do wait for idle.
> 
> So as all our usage is sync, why don't we just wait the req in
> i915_gem_switch_to_kernel_context(i915) to pinpoint the request
> uncompletion. And in addition have this as a further harderning.

They are separate for historical reasons, i.e. they have been used
independently. Note that the switch to kernel context may be between 0
and one request per engine to wait upon, and yet we still want to wait.

However, we can move the wait-for-idle into switch-to-kernel-context as
that is common across all callers at present.

* spots an open coded switch to kernel context.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2017-08-29 13:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-26 11:09 [PATCH 1/3] drm/i915: Always sanity check engine state upon idling Chris Wilson
2017-08-26 11:09 ` [PATCH 2/3] drm/i915: Clear wedged status upon resume Chris Wilson
2017-08-29 13:49   ` Mika Kuoppala
2017-08-26 11:09 ` [PATCH 3/3] drm/i915: Discard the request queue if we fail to sleep before suspend Chris Wilson
2017-08-29 13:54   ` Mika Kuoppala
2017-08-26 11:26 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Always sanity check engine state upon idling Patchwork
2017-08-26 12:21 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-08-29 12:25 ` [PATCH 1/3] " Chris Wilson
2017-08-29 13:07 ` Joonas Lahtinen
2017-08-29 13:19   ` Chris Wilson
2017-08-29 13:36 ` Mika Kuoppala
2017-08-29 13:55   ` Chris Wilson [this message]

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=150401494622.8572.237082904881947819@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.intel.com \
    --cc=mka@chromium.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.