Commit 69341a5e authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Eric Anholt

drm/i915: Hold struct_mutex while unreffing pwrctx object

This also extends the mutex to cover fbc disabling, which is safe.
Signed-off-by: default avatarKristian Høgsberg <krh@bitplanet.net>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 33db679b
...@@ -4584,8 +4584,6 @@ void intel_modeset_cleanup(struct drm_device *dev) ...@@ -4584,8 +4584,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
intel_increase_renderclock(dev, false); intel_increase_renderclock(dev, false);
del_timer_sync(&dev_priv->idle_timer); del_timer_sync(&dev_priv->idle_timer);
mutex_unlock(&dev->struct_mutex);
if (dev_priv->display.disable_fbc) if (dev_priv->display.disable_fbc)
dev_priv->display.disable_fbc(dev); dev_priv->display.disable_fbc(dev);
...@@ -4594,6 +4592,8 @@ void intel_modeset_cleanup(struct drm_device *dev) ...@@ -4594,6 +4592,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
drm_gem_object_unreference(dev_priv->pwrctx); drm_gem_object_unreference(dev_priv->pwrctx);
} }
mutex_unlock(&dev->struct_mutex);
drm_mode_config_cleanup(dev); drm_mode_config_cleanup(dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment