aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_lvds.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-09-14 13:58:48 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 17:42:54 -0400
commit06891e27a9b5dba5268bb80e41a283f51335afe7 (patch)
tree252e7a4a096249c1b3db037c27631290bcfa7e8f /drivers/gpu/drm/i915/intel_lvds.c
parentba1234d17b3b1fe7087defb191a3c705f208aca6 (diff)
drm/i915: fix suspend/resume breakage in lid notifier
We now unconditionally restore the mode at lid open time since some platforms turn off the panel, pipes or other display elements when the lid is closed. There's a problem with doing this at resume time however. At resume time, we'll get a lid event, but restoring the mode at that time may not be safe (e.g. if we get the lid event before global state has been restored), so check the suspended state and make sure our restore is locked against other mode updates. Tested-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lvds.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 4c55596649f9..c1cc5566e20b 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -651,8 +651,11 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
651 container_of(nb, struct drm_i915_private, lid_notifier); 651 container_of(nb, struct drm_i915_private, lid_notifier);
652 struct drm_device *dev = dev_priv->dev; 652 struct drm_device *dev = dev_priv->dev;
653 653
654 if (acpi_lid_open()) 654 if (acpi_lid_open() && !dev_priv->suspended) {
655 mutex_lock(&dev->mode_config.mutex);
655 drm_helper_resume_force_mode(dev); 656 drm_helper_resume_force_mode(dev);
657 mutex_unlock(&dev->mode_config.mutex);
658 }
656 659
657 drm_sysfs_hotplug_event(dev_priv->dev); 660 drm_sysfs_hotplug_event(dev_priv->dev);
658 661