xf86-video-intel: src/i830_lvds.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Wed Nov 14 16:44:40 PST 2007
src/i830_lvds.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit e64f4929690a57701241334fbca17e95b39ba3d4
Author: Jesse Barnes <jesse.barnes at intel.com>
Date: Wed Nov 14 16:44:34 2007 -0800
Backlight fixes
Open the "actual_brightness" file as read only, since we only read from it.
Also set an initial backlight_duty_cycle at init time so we don't set the
brightness to 0 at startup.
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 0942d1c..a3a56f7 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -295,7 +295,7 @@ i830_lvds_get_backlight_kernel(xf86OutputPtr output)
sprintf(path, "%s/%s/actual_brightness", BACKLIGHT_CLASS,
backlight_interfaces[backlight_index]);
- fd = open(path, O_RDWR);
+ fd = open(path, O_RDONLY);
if (fd == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to open %s for backlight "
"control: %s\n", path, strerror(errno));
@@ -1015,6 +1015,8 @@ i830_lvds_init(ScrnInfoPtr pScrn)
break;
}
+ dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
+
return;
disable_exit:
More information about the xorg-commit
mailing list