aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-01-07 09:15:36 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-10 02:46:19 -0500
commit7ad228b11ec26a820291c9f5a1168d6176580dc1 (patch)
tree005bb367f50765fb6a48a05c2572cb0a810c1ffb
parent0882dae983707455e97479e5e904e37673517ebc (diff)
drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
When the pipe A force quirk is applied the code will attempt to grab a crtc mutex during intel_modeset_setup_hw_state(). If we're already holding all crtc mutexes this will obviously deadlock every time. So instead of using drm_modeset_lock_all() just grab the mode_config.mutex. This is enough to avoid the unlocked mutex warnings from certain lower level functions. The regression was introduced in: commit 027476642811f8559cbe00ef6cc54db230e48a20 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Mon Dec 2 11:08:06 2013 +0200 drm/i915: Take modeset locks around intel_modeset_setup_hw_state() Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: stable@vger.kernel.org [danvet: Add cc: stable since the offending commit has that, too.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 769b864465a9..2bde35d34eb9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11053,10 +11053,10 @@ void intel_modeset_gem_init(struct drm_device *dev)
11053 11053
11054 intel_setup_overlay(dev); 11054 intel_setup_overlay(dev);
11055 11055
11056 drm_modeset_lock_all(dev); 11056 mutex_lock(&dev->mode_config.mutex);
11057 drm_mode_config_reset(dev); 11057 drm_mode_config_reset(dev);
11058 intel_modeset_setup_hw_state(dev, false); 11058 intel_modeset_setup_hw_state(dev, false);
11059 drm_modeset_unlock_all(dev); 11059 mutex_unlock(&dev->mode_config.mutex);
11060} 11060}
11061 11061
11062void intel_modeset_cleanup(struct drm_device *dev) 11062void intel_modeset_cleanup(struct drm_device *dev)