diff options
author | Hugh Dickins <hughd@google.com> | 2011-06-27 19:18:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-27 21:00:14 -0400 |
commit | ecbec53b1d00ba582f71b210ed96cafc05ebd189 (patch) | |
tree | d03418464a270e05b769413c8a8183c328f26210 /drivers/gpu/drm/i915/i915_dma.c | |
parent | e2377fe0b65e3c7577ff6df1701c56ef477d336f (diff) |
drm/i915: more struct_mutex locking
When auditing the locking in i915_gem.c (for a prospective change which
I then abandoned), I noticed two places where struct_mutex is not held
across GEM object manipulations that would usually require it.
Since one is in initial setup and the other in driver unload, I'm
guessing the mutex is not required for either; but post a patch in case
it is.
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 0239e9974bf2..2b79588541e7 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -2182,9 +2182,8 @@ int i915_driver_unload(struct drm_device *dev) | |||
2182 | /* Flush any outstanding unpin_work. */ | 2182 | /* Flush any outstanding unpin_work. */ |
2183 | flush_workqueue(dev_priv->wq); | 2183 | flush_workqueue(dev_priv->wq); |
2184 | 2184 | ||
2185 | i915_gem_free_all_phys_object(dev); | ||
2186 | |||
2187 | mutex_lock(&dev->struct_mutex); | 2185 | mutex_lock(&dev->struct_mutex); |
2186 | i915_gem_free_all_phys_object(dev); | ||
2188 | i915_gem_cleanup_ringbuffer(dev); | 2187 | i915_gem_cleanup_ringbuffer(dev); |
2189 | mutex_unlock(&dev->struct_mutex); | 2188 | mutex_unlock(&dev->struct_mutex); |
2190 | if (I915_HAS_FBC(dev) && i915_powersave) | 2189 | if (I915_HAS_FBC(dev) && i915_powersave) |