All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Zhi Wang <zhi.a.wang@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Niu, Bing" <bing.niu@intel.com>
Subject: Re: [PATCH] drm/i915: Also perform gpu reset under execlist mode.
Date: Thu, 25 Jun 2015 14:42:48 +0100	[thread overview]
Message-ID: <20150625134248.GN30757@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <558B27AA.9020404@intel.com>

On Thu, Jun 25, 2015 at 05:56:58AM +0800, Zhi Wang wrote:
> Hi Chris:
>     Thanks for the reply! I just dig the code. It looks there is no
> special code path for execlist shutdown. It has init_rings(), but
> doesn't have cleanup_rings(), only clean_ring(), which are called
> for each ring one by one when i915_gem_cleanup_ringbuffer() gets
> called.
> 
> Do you have any advice? :)

The quick and dirty version would be:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 111c5cb2aa99..254c8e28963c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5096,6 +5096,14 @@ i915_gem_cleanup_ringbuffer(struct drm_device *dev)
 
        for_each_ring(ring, dev_priv, i)
                dev_priv->gt.cleanup_ring(ring);
+
+       if (i915.enable_execlists)
+               /*
+                * Neither the BIOS, ourselves or any other kernel
+                * expects the system to be in execlists mode on startup,
+                * so we need to reset the GPU back to legacy mode.
+                */
+               intel_gpu_reset(dev);
 }
 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-06-25 13:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 14:40 [PATCH] drm/i915: Also perform gpu reset under execlist mode bing.niu
2015-06-25  8:13 ` Chris Wilson
2015-06-25 12:24   ` Wang, Zhi A
2015-06-25 12:37     ` Chris Wilson
2015-06-24 21:56       ` Zhi Wang
2015-06-25 13:42         ` Chris Wilson [this message]
2015-06-24 22:13           ` Zhi Wang
2015-06-25 13:20   ` Daniel Vetter

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=20150625134248.GN30757@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=bing.niu@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=zhi.a.wang@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.