From 273d34fbc43e54a8539fbe7efc1dca66bbb4e6dc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 7 Sep 2010 12:57:04 +0100 Subject: [PATCH] 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 --- src/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;