[Intel-gfx] [PATCH] drm/i915: Also perform gpu reset under execlist mode.

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 25 06:42:48 PDT 2015


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


More information about the Intel-gfx mailing list