linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] gma500: Prevent endless loop in panel power up sequence
@ 2012-05-21 14:27 Alan Cox
  2012-05-21 14:27 ` [PATCH 2/3] gma500: handle poulsbo cursor restriction Alan Cox
  2012-05-21 14:27 ` [PATCH 3/3] gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports Alan Cox
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Cox @ 2012-05-21 14:27 UTC (permalink / raw)
  To: airlied, dri-devel, linux-acpi

From: Alan Cox <alan@linux.intel.com>

Some devices don't have a panel connected to LVDS and thus will never power up.
This patch checks the power sequence progress bits in PP_STATUS to prevent an
endless loop on such devices.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/gpu/drm/gma500/psb_lid.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_lid.c b/drivers/gpu/drm/gma500/psb_lid.c
index 7ff8bb2b..1d2ebb5 100644
--- a/drivers/gpu/drm/gma500/psb_lid.c
+++ b/drivers/gpu/drm/gma500/psb_lid.c
@@ -40,10 +40,16 @@ static void psb_lid_timer_func(unsigned long data)
 		REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) | POWER_TARGET_ON);
 		do {
 			pp_status = REG_READ(PP_STATUS);
-		} while ((pp_status & PP_ON) == 0);
+		} while ((pp_status & PP_ON) == 0 &&
+			 (pp_status & PP_SEQUENCE_MASK) != 0);
 
-		/*FIXME: should be backlight level before*/
-		psb_intel_lvds_set_brightness(dev, 100);
+		if (REG_READ(PP_STATUS) & PP_ON) {
+			/*FIXME: should be backlight level before*/
+			psb_intel_lvds_set_brightness(dev, 100);
+		} else {
+			DRM_DEBUG("LVDS panel never powered up");
+			return;
+		}
 	} else {
 		psb_intel_lvds_set_brightness(dev, 0);
 


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

end of thread, other threads:[~2012-05-21 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 14:27 [PATCH 1/3] gma500: Prevent endless loop in panel power up sequence Alan Cox
2012-05-21 14:27 ` [PATCH 2/3] gma500: handle poulsbo cursor restriction Alan Cox
2012-05-21 14:27 ` [PATCH 3/3] gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).