diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-07 12:57:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-07 13:00:23 +0100 |
commit | 273d34fbc43e54a8539fbe7efc1dca66bbb4e6dc (patch) | |
tree | 8aa6a12c375e44bb75f204e693cb09e5aa395c64 | |
parent | 53767cc0d0a58d36cd445da3a31c65b349eebbba (diff) |
display: Query current level after finding max value.
The current backlight value is clamped to the valid range [0, max] and
so as we queried the value before setting the max, we forced the current
backlight to 0 and so set it to be zero on initialising the display.
Fixes:
Bug 30063 - start X will modify brightness value to zero
https://bugs.freedesktop.org/show_bug.cgi?id=30063
which is a regression due to 38f940dfea494d3093236f065392c431be06ae6e.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel_display.c b/src/intel_display.c index b3c8a7ce..e65df6e1 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -239,9 +239,9 @@ intel_output_backlight_init(xf86OutputPtr output) sprintf(path, "%s/%s", BACKLIGHT_CLASS, backlight_interfaces[i]); if (!stat(path, &buf)) { intel_output->backlight_iface = backlight_interfaces[i]; - intel_output->backlight_active_level = intel_output_backlight_get(output); intel_output->backlight_max = intel_output_backlight_get_max(output); if (intel_output->backlight_max > 0) { + intel_output->backlight_active_level = intel_output_backlight_get(output); xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "found backlight control interface %s\n", path); return; |