diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-06-18 15:01:36 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-18 14:59:46 +0100 |
commit | 52af321a11b5672194bc0bad033b0866221bf4c7 (patch) | |
tree | b4f4c4128f9b29fcde454bd04c96873ad413351f /src/uxa | |
parent | 44b5912ffcf8dcf4b4b8d3518dd0b62a284f6ee4 (diff) |
uxa: When the output is off, report the cached backlight value
This is a "backport" of commit b545e10c50cb to uxa, so that users who are
still using uxa, don't end up with a black screen after suspend / resume.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1032978
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1103806
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/uxa')
-rw-r--r-- | src/uxa/intel_display.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index b90061b0..e00b9c2e 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -1257,9 +1257,13 @@ intel_output_get_property(xf86OutputPtr output, Atom property) if (!intel_output->backlight.iface) return FALSE; - val = intel_output_backlight_get(output); - if (val < 0) - return FALSE; + if (intel_output->dpms_mode == DPMSModeOn) { + val = intel_output_backlight_get(output); + if (val < 0) + return FALSE; + } else { + val = intel_output->backlight_active_level; + } err = RRChangeOutputProperty(output->randr_output, property, XA_INTEGER, 32, PropModeReplace, 1, &val, |