summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-28 15:51:39 +0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-28 23:55:01 +0400
commit17250b71553680bc6e927497aa619ab06ab1015b (patch)
treeb311b8a425bdf7e5809b6f51237a5d3ebb20cfa0 /drivers/gpu/drm/i915/i915_dma.c
parent176f28ebf4303b4f7e3a5bd8be7842a8bbecd9c3 (diff)
downloadlinux-17250b71553680bc6e927497aa619ab06ab1015b.tar.xz
drm/i915: Make the inactive object shrinker per-device
Eliminate the racy device unload by embedding a shrinker into each device. Smaller, simpler code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index f8827c23a668..dddca007912a 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -2096,6 +2096,9 @@ int i915_driver_unload(struct drm_device *dev)
i915_mch_dev = NULL;
spin_unlock(&mchdev_lock);
+ if (dev_priv->mm.inactive_shrinker.shrink)
+ unregister_shrinker(&dev_priv->mm.inactive_shrinker);
+
mutex_lock(&dev->struct_mutex);
ret = i915_gpu_idle(dev);
if (ret)