From: Sean Paul Date: Fri, 23 Mar 2012 12:52:58 +0000 (-0400) Subject: drm/i915: Add lock on drm_helper_resume_force_mode X-Git-Tag: firefly_0821_release~7541^2~1422 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4482e98a406487cf1adadd88d23b99e40ca44aa8;p=firefly-linux-kernel-4.4.55.git drm/i915: Add lock on drm_helper_resume_force_mode commit 927a2f119e8235238a2fc64871051b16c9bdae75 upstream. 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 Reviewed-by: Chris Wilson Signed-Off-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 2d3e16b3a09a..111686ada271 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -442,7 +442,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);