xf86-video-intel: src/i830_lvds.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Fri Jan 11 10:29:15 PST 2008
src/i830_lvds.c | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit 4fec18e07f2b23306e885d63c74661ae0e4b04d9
Author: Jesse Barnes <jesse.barnes at intel.com>
Date: Fri Jan 11 10:28:59 2008 -0800
Turn on backlight when LVDS panel is powered up
In some configurations, the LVDS may be off at startup along with the
backlight. So when turning the LVDS on for the first time, we may also need to
set the backlight to a non-zero value. So try to use the saved value if
possible, but if it's zero, make the backlight full brightness when turning on
the LVDS.
Note that this is slightly sub-optimal for configurations where zero is a valid backlight brightness.
Fixes fdo bz #13958.
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 50ecb60..ef8fa4a 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -372,6 +372,17 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
CARD32 pp_status;
if (on) {
+ /*
+ * If we're going from off->on we may need to turn on the backlight.
+ * We should use the saved value whenever possible, but on some
+ * machines 0 is a valid backlight value (due to an external backlight
+ * controller for example), so on them, when turning LVDS back on,
+ * they'll always re-maximize the brightness.
+ */
+ if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
+ dev_priv->backlight_duty_cycle == 0)
+ dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
+
OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
do {
pp_status = INREG(PP_STATUS);
More information about the xorg-commit
mailing list