All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/lvds: Only act on lid notify when the device is on
@ 2011-04-21 22:08 Alex Williamson
  2011-04-22  5:58 ` Chris Wilson
  2011-04-24 10:05 ` Chris Wilson
  0 siblings, 2 replies; 7+ messages in thread
From: Alex Williamson @ 2011-04-21 22:08 UTC (permalink / raw)
  To: chris; +Cc: dri-devel

If we're using vga switcheroo, the device may be turned off
and poking at it can cause an oops.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 drivers/gpu/drm/i915/intel_lvds.c |    3 +++
 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 a562bd2..67cb076 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,
 	struct drm_device *dev = dev_priv->dev;
 	struct drm_connector *connector = dev_priv->int_lvds_connector;
 
+	if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
+		return NOTIFY_OK;
+
 	/*
 	 * check and update the status of LVDS connector after receiving
 	 * the LID nofication event.

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-24 13:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 22:08 [PATCH] drm/i915/lvds: Only act on lid notify when the device is on Alex Williamson
2011-04-22  5:58 ` Chris Wilson
2011-04-22  6:13   ` Dave Airlie
2011-04-22  6:26     ` Chris Wilson
2011-04-23 14:42   ` Alex Williamson
2011-04-24 10:05 ` Chris Wilson
2011-04-24 13:26   ` Alex Williamson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.