drm/i915: take mode config lock around crtc disable at suspend
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 26 Nov 2013 17:13:41 +0000 (09:13 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Nov 2013 18:09:14 +0000 (19:09 +0100)
This is just a theoretical issue, but we need to do this to prevent the
WARN in pipe_from_connector at suspend time.

This regression has been introduce in

commit 7bd688cd66db93f6430f6e2b3145ee5686daa315
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Fri Nov 8 16:48:56 2013 +0200

    drm/i915: handle backlight through chip specific functions

https://bugs.freedesktop.org/show_bug.cgi?id=71978
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c

index 989be12cdd6e962e625b8376734f101ace947d1c..2e367a1c6a644b70e7f5375f9e88a22dd0531e08 100644 (file)
@@ -534,8 +534,10 @@ static int i915_drm_freeze(struct drm_device *dev)
                 * Disable CRTCs directly since we want to preserve sw state
                 * for _thaw.
                 */
+               mutex_lock(&dev->mode_config.mutex);
                list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
                        dev_priv->display.crtc_disable(crtc);
+               mutex_unlock(&dev->mode_config.mutex);
 
                intel_modeset_suspend_hw(dev);
        }