aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-19 15:55:32 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-20 04:06:29 -0400
commit55a6662837a5efe48c836bfc3570ace348f3db09 (patch)
treebf24c1d1e062762abe4abad777fd362bc9764af0 /drivers/gpu/drm/i915/i915_dma.c
parente3f33d46fd917747e966f8e6d25f2940223ad1ee (diff)
drm/i915: fix module unload after context merge
commit 8e96d9c4d9843f00ebeb4a9b33596d96602ea101 Author: Ben Widawsky <ben@bwidawsk.net> Date: Mon Jun 4 14:42:56 2012 -0700 drm/i915: reset the GPU on context fini broke module unload because it reset the gpu before we've stopped touching it. Later on in the unload sequence the ringbuffer code complained that the gpu would idle properly (because intel_gpu_reset only resets the hw and not our sw state). v2: Reorder things so that we reset the gpu _before_ we release the backing storage of the default context. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51183 Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index ba75af12f1fd..9913a77478a3 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1669,7 +1669,6 @@ int i915_driver_unload(struct drm_device *dev)
1669 if (ret) 1669 if (ret)
1670 DRM_ERROR("failed to idle hardware: %d\n", ret); 1670 DRM_ERROR("failed to idle hardware: %d\n", ret);
1671 i915_gem_retire_requests(dev); 1671 i915_gem_retire_requests(dev);
1672 i915_gem_context_fini(dev);
1673 mutex_unlock(&dev->struct_mutex); 1672 mutex_unlock(&dev->struct_mutex);
1674 1673
1675 /* Cancel the retire work handler, which should be idle now. */ 1674 /* Cancel the retire work handler, which should be idle now. */
@@ -1720,6 +1719,7 @@ int i915_driver_unload(struct drm_device *dev)
1720 mutex_lock(&dev->struct_mutex); 1719 mutex_lock(&dev->struct_mutex);
1721 i915_gem_free_all_phys_object(dev); 1720 i915_gem_free_all_phys_object(dev);
1722 i915_gem_cleanup_ringbuffer(dev); 1721 i915_gem_cleanup_ringbuffer(dev);
1722 i915_gem_context_fini(dev);
1723 mutex_unlock(&dev->struct_mutex); 1723 mutex_unlock(&dev->struct_mutex);
1724 i915_gem_cleanup_aliasing_ppgtt(dev); 1724 i915_gem_cleanup_aliasing_ppgtt(dev);
1725 i915_gem_cleanup_stolen(dev); 1725 i915_gem_cleanup_stolen(dev);