drm/i915: Hold CRTC lock whilst freezing the planes
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_drv.c
index 009d677a2385ca11a49a294c4fe647ab25f82ff8..c83c83b74bf4471c19070bde3488549b577e2330 100644 (file)
@@ -532,8 +532,11 @@ static int i915_drm_freeze(struct drm_device *dev)
                 * for _thaw.
                 */
                mutex_lock(&dev->mode_config.mutex);
-               for_each_crtc(dev, crtc)
+               for_each_crtc(dev, crtc) {
+                       mutex_lock(&crtc->mutex);
                        dev_priv->display.crtc_disable(crtc);
+                       mutex_unlock(&crtc->mutex);
+               }
                mutex_unlock(&dev->mode_config.mutex);
 
                intel_modeset_suspend_hw(dev);
@@ -597,24 +600,6 @@ void intel_console_resume(struct work_struct *work)
        console_unlock();
 }
 
-static void intel_resume_hotplug(struct drm_device *dev)
-{
-       struct drm_mode_config *mode_config = &dev->mode_config;
-       struct intel_encoder *encoder;
-
-       mutex_lock(&mode_config->mutex);
-       DRM_DEBUG_KMS("running encoder hotplug functions\n");
-
-       list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
-               if (encoder->hot_plug)
-                       encoder->hot_plug(encoder);
-
-       mutex_unlock(&mode_config->mutex);
-
-       /* Just fire off a uevent and let userspace tell us what to do */
-       drm_helper_hpd_irq_event(dev);
-}
-
 static int i915_drm_thaw_early(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
@@ -670,7 +655,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
                intel_hpd_init(dev);
                dev_priv->enable_hotplug_processing = true;
                /* Config may have changed between suspend and resume */
-               intel_resume_hotplug(dev);
+               drm_helper_hpd_irq_event(dev);
        }
 
        intel_opregion_init(dev);
This page took 0.028733 seconds and 5 git commands to generate.