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.
This commit is contained in:
parent
53e3693ef1
commit
e64f492969
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue