diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-23 21:59:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-23 21:59:20 +0100 |
commit | 5935c93ce77a5da09aab9b45b1a5710d681c171e (patch) | |
tree | eb986853e68a183d3a03f7ad7a23c8d06844a8ae | |
parent | f9e7ac7db7b0331131aa1df3a90d4b2692949efa (diff) |
sna: Keep the backlight at the same brightness when switching away
Before VT switching, we disable all the outputs. This has the
side-effect of disabling the backlight, but commonly the console does
not set the backlight brightness itself and so we re-enable the
backlight on its behalf. Rather than set the backlight to max
brightness, reset it to the last user value, as maximum can be very
bright!
Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 376f2618..26f35ecb 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -6090,7 +6090,7 @@ void sna_mode_reset(struct sna *sna) rotation_reset(&sna_crtc->sprite); } - /* VT switching, likely to fbcon so make the backlight usable */ + /* VT switching, likely to be fbcon so make the backlight usable */ for (i = 0; i < sna->mode.num_real_output; i++) { struct sna_output *sna_output = to_sna_output(config->output[i]); @@ -6101,7 +6101,7 @@ void sna_mode_reset(struct sna *sna) continue; sna_output_backlight_set(sna_output, - sna_output->backlight.max); + sna_output->backlight_active_level); } /* drain the event queue */ |