public inbox for intel-gfx@lists.freedesktop.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/2] drm/i915: Always stop the rings before a missing GPU reset
Date: Fri, 13 Oct 2017 16:55:56 +0300	[thread overview]
Message-ID: <871sm7jgnn.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20171013131218.18013-2-chris@chris-wilson.co.uk>

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

> Always try to stop the rings, even if the GPU reset itself has been
> disabled (via modparam i915.reset). This should at least stop the hw
> from spinning in the background consuming resources (e.g. power and
> memory bandwidth) letting the system rest-in-peace.
>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=103260
> 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_uncore.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 983617b5b338..20e3c65c0999 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -1403,6 +1403,9 @@ static void i915_stop_engines(struct drm_i915_private *dev_priv,
>  	struct intel_engine_cs *engine;
>  	enum intel_engine_id id;
>  
> +	if (INTEL_GEN(dev_priv) < 3)
> +		return;
> +
>  	for_each_engine_masked(engine, dev_priv, engine_mask, id)
>  		gen3_stop_engine(engine);
>  }
> @@ -1742,16 +1745,12 @@ static reset_func intel_get_gpu_reset(struct drm_i915_private *dev_priv)
>  
>  int intel_gpu_reset(struct drm_i915_private *dev_priv, unsigned engine_mask)
>  {
> -	reset_func reset;
> +	reset_func reset = intel_get_gpu_reset(dev_priv);
>  	int retry;
>  	int ret;
>  
>  	might_sleep();
>  
> -	reset = intel_get_gpu_reset(dev_priv);
> -	if (reset == NULL)
> -		return -ENODEV;
> -
>  	/* If the power well sleeps during the reset, the reset
>  	 * request may be dropped and never completes (causing -EIO).
>  	 */
> @@ -1771,7 +1770,9 @@ int intel_gpu_reset(struct drm_i915_private *dev_priv, unsigned engine_mask)
>  		 */
>  		i915_stop_engines(dev_priv, engine_mask);
>  
> -		ret = reset(dev_priv, engine_mask);
> +		ret = -ENODEV;
> +		if (reset)
> +			ret = reset(dev_priv, engine_mask);
>  		if (ret != -ETIMEDOUT)
>  			break;
>  
> -- 
> 2.15.0.rc0
>
> _______________________________________________
> 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:[~2017-10-13 13:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 13:12 [PATCH 1/2] drm/i915: Keep the rings stopped until they have been re-initialized Chris Wilson
2017-10-13 13:12 ` [PATCH 2/2] drm/i915: Always stop the rings before a missing GPU reset Chris Wilson
2017-10-13 13:55   ` Mika Kuoppala [this message]
2017-10-13 13:49 ` [PATCH 1/2] drm/i915: Keep the rings stopped until they have been re-initialized Mika Kuoppala
2017-10-13 14:57 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2017-10-13 19:53 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-10-13 19:58   ` 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=871sm7jgnn.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