diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 0cab2d045135..ac9dac99b585 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1848,8 +1848,10 @@ void i915_driver_lastclose(struct drm_device * dev) | |||
1848 | 1848 | ||
1849 | void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) | 1849 | void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) |
1850 | { | 1850 | { |
1851 | mutex_lock(&dev->struct_mutex); | ||
1851 | i915_gem_context_close(dev, file_priv); | 1852 | i915_gem_context_close(dev, file_priv); |
1852 | i915_gem_release(dev, file_priv); | 1853 | i915_gem_release(dev, file_priv); |
1854 | mutex_unlock(&dev->struct_mutex); | ||
1853 | } | 1855 | } |
1854 | 1856 | ||
1855 | void i915_driver_postclose(struct drm_device *dev, struct drm_file *file) | 1857 | void i915_driver_postclose(struct drm_device *dev, struct drm_file *file) |
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 72a3df32292f..4a05956162c1 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c | |||
@@ -347,10 +347,8 @@ void i915_gem_context_close(struct drm_device *dev, struct drm_file *file) | |||
347 | { | 347 | { |
348 | struct drm_i915_file_private *file_priv = file->driver_priv; | 348 | struct drm_i915_file_private *file_priv = file->driver_priv; |
349 | 349 | ||
350 | mutex_lock(&dev->struct_mutex); | ||
351 | idr_for_each(&file_priv->context_idr, context_idr_cleanup, NULL); | 350 | idr_for_each(&file_priv->context_idr, context_idr_cleanup, NULL); |
352 | idr_destroy(&file_priv->context_idr); | 351 | idr_destroy(&file_priv->context_idr); |
353 | mutex_unlock(&dev->struct_mutex); | ||
354 | } | 352 | } |
355 | 353 | ||
356 | static struct i915_hw_context * | 354 | static struct i915_hw_context * |