diff options
author | Alan Cox <alan@linux.intel.com> | 2012-05-21 10:27:10 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-05-22 05:15:29 -0400 |
commit | ac0a5dd6ae764ba228ec645920b78c70cee05eb7 (patch) | |
tree | 38cdd714609bf77435fa5f8ec8cc0433570fb93d | |
parent | 3299de9558687ec02b3b9fae1af639844c46ea4b (diff) |
gma500: Prevent endless loop in panel power up sequence
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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | 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 7ff8bb2bdc23..1d2ebb5e530f 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) | |||
40 | REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) | POWER_TARGET_ON); | 40 | REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) | POWER_TARGET_ON); |
41 | do { | 41 | do { |
42 | pp_status = REG_READ(PP_STATUS); | 42 | pp_status = REG_READ(PP_STATUS); |
43 | } while ((pp_status & PP_ON) == 0); | 43 | } while ((pp_status & PP_ON) == 0 && |
44 | (pp_status & PP_SEQUENCE_MASK) != 0); | ||
44 | 45 | ||
45 | /*FIXME: should be backlight level before*/ | 46 | if (REG_READ(PP_STATUS) & PP_ON) { |
46 | psb_intel_lvds_set_brightness(dev, 100); | 47 | /*FIXME: should be backlight level before*/ |
48 | psb_intel_lvds_set_brightness(dev, 100); | ||
49 | } else { | ||
50 | DRM_DEBUG("LVDS panel never powered up"); | ||
51 | return; | ||
52 | } | ||
47 | } else { | 53 | } else { |
48 | psb_intel_lvds_set_brightness(dev, 0); | 54 | psb_intel_lvds_set_brightness(dev, 0); |
49 | 55 | ||