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] drm/i915: Report engines are idle if already parked
Date: Thu, 28 Feb 2019 11:08:21 +0200	[thread overview]
Message-ID: <87k1hkuvp6.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190227214159.7946-1-chris@chris-wilson.co.uk>

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

> If we have parked, then we must have passed an idleness test and still
> be idle. We chose not to use this shortcut in the past so that we could
> use the idleness test at any time and inspect HW. However, some HW like
> Sandybridge, doesn't like being woken up frivolously, so avoid doing so.
>
> References: 0b702dca2658 ("drm/i915: Avoid waking the engines just to check if they are idle")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

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

> ---
>  drivers/gpu/drm/i915/intel_engine_cs.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index b7b626195eda..96a38f411bc7 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1033,7 +1033,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
>  	return ring_is_idle(engine);
>  }
>  
> -bool intel_engines_are_idle(struct drm_i915_private *dev_priv)
> +bool intel_engines_are_idle(struct drm_i915_private *i915)
>  {
>  	struct intel_engine_cs *engine;
>  	enum intel_engine_id id;
> @@ -1042,10 +1042,14 @@ bool intel_engines_are_idle(struct drm_i915_private *dev_priv)
>  	 * If the driver is wedged, HW state may be very inconsistent and
>  	 * report that it is still busy, even though we have stopped using it.
>  	 */
> -	if (i915_reset_failed(dev_priv))
> +	if (i915_reset_failed(i915))
>  		return true;
>  
> -	for_each_engine(engine, dev_priv, id) {
> +	/* Already parked (and passed an idleness test); must still be idle */
> +	if (!READ_ONCE(i915->gt.awake))
> +		return true;
> +
> +	for_each_engine(engine, i915, id) {
>  		if (!intel_engine_is_idle(engine))
>  			return false;
>  	}
> -- 
> 2.20.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

  reply	other threads:[~2019-02-28  9:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 20:46 [PATCH 1/2] Revert "drm/i915: Avoid waking the engines just to check if they are idle" Chris Wilson
2019-02-27 20:46 ` [PATCH 2/2] drm/i915: Report engines are idle if already parked Chris Wilson
2019-02-27 21:41   ` [PATCH] " Chris Wilson
2019-02-28  9:08     ` Mika Kuoppala [this message]
2019-02-28  9:17       ` Chris Wilson
2019-02-27 21:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] Revert "drm/i915: Avoid waking the engines just to check if they are idle" Patchwork
2019-02-27 21:49 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-27 21:52 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] Revert "drm/i915: Avoid waking the engines just to check if they are idle" (rev2) Patchwork
2019-02-27 22:21 ` ✓ Fi.CI.BAT: success " Patchwork
2019-02-27 23:38 ` ✓ Fi.CI.IGT: " Patchwork
2019-02-28  9:01 ` [PATCH 1/2] Revert "drm/i915: Avoid waking the engines just to check if they are idle" Mika Kuoppala

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=87k1hkuvp6.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.