[Intel-gfx] [PATCH] Don't ignore backlight level change to the same level.

Matthias Hopf mhopf at suse.de
Tue Aug 18 19:07:24 CEST 2009


If set externally to a different level, this would result in a no-op.
OTOH if the display is switched off (DPMS) you do not want the change to take
place immediately, but rather to be saved and set later when the display is
active again.
---
 src/drmmode_display.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f41b978..64b28ef 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1096,10 +1096,9 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property,
 	if (val < 0 || val > drmmode_output->backlight_max)
 	    return FALSE;
 
-	if (val != drmmode_output->backlight_active_level) {
+	if (drmmode_output->dpms_mode == DPMSModeOn)
 	    drmmode_backlight_set(output, val);
-	    drmmode_output->backlight_active_level = val;
-	}
+	drmmode_output->backlight_active_level = val;
 	return TRUE;
     }
 
-- 
1.6.0.2




More information about the Intel-gfx mailing list