summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2006-12-01 12:49:43 -0800
committerEric Anholt <eric@anholt.net>2006-12-01 12:50:09 -0800
commita504e31f0fefdec802ae403573f52fac3d577b65 (patch)
treee268583fe9208cc811c8403f24e061284fac0ee9 /src
parentf21230d3e1cc5470e8f88404b5d9f1702bec44bb (diff)
Don't try to write the read-only PP_STATUS register.
Also, don't bother reading the PP_CONTROL register to try to get LVDS status -- that's what PP_STATUS is for.
Diffstat (limited to 'src')
-rw-r--r--src/i830_lvds.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index bfb4e148..cf709569 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -50,12 +50,10 @@ i830SetLVDSPanelPower(ScrnInfoPtr pScrn, Bool on)
pI830->backlight_duty_cycle = backlight_duty_cycle;
if (on) {
- OUTREG(PP_STATUS, INREG(PP_STATUS) | PP_ON);
OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
do {
pp_status = INREG(PP_STATUS);
- pp_control = INREG(PP_CONTROL);
- } while (!(pp_status & PP_ON) && !(pp_control & POWER_TARGET_ON));
+ } while ((pp_status & PP_ON) == 0);
OUTREG(BLC_PWM_CTL,
(blc_pwm_ctl & ~BACKLIGHT_DUTY_CYCLE_MASK) |
pI830->backlight_duty_cycle);
@@ -63,12 +61,10 @@ i830SetLVDSPanelPower(ScrnInfoPtr pScrn, Bool on)
OUTREG(BLC_PWM_CTL,
(blc_pwm_ctl & ~BACKLIGHT_DUTY_CYCLE_MASK));
- OUTREG(PP_STATUS, INREG(PP_STATUS) & ~PP_ON);
OUTREG(PP_CONTROL, INREG(PP_CONTROL) & ~POWER_TARGET_ON);
do {
pp_status = INREG(PP_STATUS);
- pp_control = INREG(PP_CONTROL);
- } while ((pp_status & PP_ON) || (pp_control & POWER_TARGET_ON));
+ } while (pp_status & PP_ON);
}
}