diff --git a/src/i830_lvds.c b/src/i830_lvds.c index c58a7e0..6bfbadc 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -234,6 +234,12 @@ i830_lvds_set_backlight_combo(xf86OutputPtr output, int level) #endif } + /* + * Don't set the lowest bit in combo configs since it can act as a flag for + * max brightness. + */ + level <<= 1; + blc_pwm_ctl = INREG(BLC_PWM_CTL); blc_pwm_ctl &= ~BACKLIGHT_DUTY_CYCLE_MASK; OUTREG(BLC_PWM_CTL, blc_pwm_ctl | (level << BACKLIGHT_DUTY_CYCLE_SHIFT)); @@ -251,6 +257,13 @@ i830_lvds_get_backlight_combo(xf86OutputPtr output) return blc_pwm_ctl; } +static int +i830_lvds_get_backlight_max_combo(xf86OutputPtr output) +{ + /* Since we don't set the low bit when using combo, the range is halved */ + return i830_lvds_get_backlight_max_native(output) / 2; +} + /* * Kernel methods */