From a504e31f0fefdec802ae403573f52fac3d577b65 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 1 Dec 2006 12:49:43 -0800 Subject: [PATCH] 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. --- src/i830_lvds.c | 8 ++------ 1 file 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); } }