diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-28 12:51:39 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-28 20:55:01 +0100 |
commit | 17250b71553680bc6e927497aa619ab06ab1015b (patch) | |
tree | b311b8a425bdf7e5809b6f51237a5d3ebb20cfa0 /drivers/gpu/drm/i915/i915_dma.c | |
parent | 176f28ebf4303b4f7e3a5bd8be7842a8bbecd9c3 (diff) | |
download | talos-op-linux-17250b71553680bc6e927497aa619ab06ab1015b.tar.gz talos-op-linux-17250b71553680bc6e927497aa619ab06ab1015b.zip |
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.c | 3 |
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) |