aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2011-04-21 18:08:14 -0400
committerKeith Packard <keithp@keithp.com>2011-05-09 12:13:22 -0400
commit2fb4e61d9471867677c97bf11dba8f1e9dfa7f7c (patch)
tree4a1884e1fb0b26f43898ca16a71f5b757d932c1d /drivers/gpu
parent39adb7a542db08998b4ae88f1698c4300dc39b55 (diff)
drm/i915/lvds: Only act on lid notify when the device is on
If we're using vga switcheroo, the device may be turned off and poking it can return random state. This provokes an OOPS fixed separately by 8ff887c847 (drm/i915/dp: Be paranoid in case we disable a DP before it is attached). Trying to use and respond to events on a device that has been turned off by the user is in principle a silly thing to do. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index a562bd2648c7..67cb076d271b 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -539,6 +539,9 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
539 struct drm_device *dev = dev_priv->dev; 539 struct drm_device *dev = dev_priv->dev;
540 struct drm_connector *connector = dev_priv->int_lvds_connector; 540 struct drm_connector *connector = dev_priv->int_lvds_connector;
541 541
542 if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
543 return NOTIFY_OK;
544
542 /* 545 /*
543 * check and update the status of LVDS connector after receiving 546 * check and update the status of LVDS connector after receiving
544 * the LID nofication event. 547 * the LID nofication event.