summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2009-09-03 16:34:08 +0200
committerMatthias Hopf <mhopf@suse.de>2009-09-03 16:34:08 +0200
commite903b3ebad29d943c05ff550940034c3a43e0235 (patch)
treec9f1816656f5c3988d25eff2a1c015b2d2ea3348
parent91f26937c1a3a4f33da86aa6b62ab9b288a54e15 (diff)
Don't set backlight level if going on->on.
Otherwise changed backlight will be reset upon DPMS switch off, because first this function is called with DPMSModeOn.
-rw-r--r--src/drmmode_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b6827579..04ba350b 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -882,7 +882,8 @@ drmmode_output_dpms_backlight(xf86OutputPtr output, int oldmode, int mode)
if (mode == DPMSModeOn) {
/* If we're going from off->on we may need to turn on the backlight. */
- drmmode_backlight_set(output, drmmode_output->backlight_active_level);
+ if (oldmode != DPMSModeOn)
+ drmmode_backlight_set(output, drmmode_output->backlight_active_level);
} else {
/* Only save the current backlight value if we're going from on to off. */
if (oldmode == DPMSModeOn)