drm/i915: Add lock on drm_helper_resume_force_mode
authorSean Paul <seanpaul@chromium.org>
Fri, 23 Mar 2012 12:52:58 +0000 (08:52 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 3 Apr 2012 08:37:37 +0000 (10:37 +0200)
i915_drm_thaw was not locking the mode_config lock when calling
drm_helper_resume_force_mode. When there were multiple wake sources,
this caused FDI training failure on SNB which in turn corrupted the
display.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c

index 19d55bc548735cde5b235d77c7289469aa6db267..dfa55e7478fb88501bdb73d29edbd14b5f8eecaa 100644 (file)
@@ -538,7 +538,9 @@ static int i915_drm_thaw(struct drm_device *dev)
                drm_irq_install(dev);
 
                /* Resume the modeset for every activated CRTC */
+               mutex_lock(&dev->mode_config.mutex);
                drm_helper_resume_force_mode(dev);
+               mutex_unlock(&dev->mode_config.mutex);
 
                if (IS_IRONLAKE_M(dev))
                        ironlake_enable_rc6(dev);