From: Niu,Bing Date: Fri, 3 Jul 2015 16:27:34 +0000 (+0800) Subject: drm/i915: Also perform gpu reset under execlist mode. X-Git-Tag: v4.3-rc1~75^2~36^2~82 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a647828afc7d7d352aeb076dbc03bd952b09b1e3;p=karo-tx-linux.git drm/i915: Also perform gpu reset under execlist mode. It is found that i915 will not reset gpu under execlist mode when unload module. that will lead to some issues when unload/load module with different submission mode. e.g. from execlist mode to ring buffer mode via loading/unloading i915. Because HW is not in a reset state and registers are not clean under such condition. Signed-off-by: Niu,Bing Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index c8ee13f466c8..672c803a0a27 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -5196,6 +5196,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); } static void