summaryrefslogtreecommitdiff
path: root/src/i830_lvds.c
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-11-14 16:44:34 -0800
committerJesse Barnes <jesse.barnes@intel.com>2007-11-14 16:44:34 -0800
commite64f4929690a57701241334fbca17e95b39ba3d4 (patch)
treed4699b68e895ee093e2cd8f1fdaa2b74c14fa756 /src/i830_lvds.c
parent53e3693ef13f31f3fc33bcff7286ab2b03b2d430 (diff)
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.
Diffstat (limited to 'src/i830_lvds.c')
-rw-r--r--src/i830_lvds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 0942d1cb..a3a56f7b 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: