sna: When the output is off, report the cached backlight value
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f0b8720807
commit
b545e10c50
|
|
@ -2646,9 +2646,17 @@ sna_output_get_property(xf86OutputPtr output, Atom property)
|
||||||
if (!sna_output->backlight.iface)
|
if (!sna_output->backlight.iface)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
val = sna_output_backlight_get(output);
|
if (sna_output->dpms_mode == DPMSModeOn) {
|
||||||
if (val < 0)
|
val = sna_output_backlight_get(output);
|
||||||
return FALSE;
|
if (val < 0)
|
||||||
|
return FALSE;
|
||||||
|
DBG(("%s(%s): output on, reporting actual backlight value [%d]\n",
|
||||||
|
__FUNCTION__, output->name, val));
|
||||||
|
} else {
|
||||||
|
val = sna_output->backlight_active_level;
|
||||||
|
DBG(("%s(%s): output off, reporting cached backlight value [%d]\n",
|
||||||
|
__FUNCTION__, output->name, val));
|
||||||
|
}
|
||||||
|
|
||||||
err = RRChangeOutputProperty(output->randr_output, property,
|
err = RRChangeOutputProperty(output->randr_output, property,
|
||||||
XA_INTEGER, 32, PropModeReplace, 1, &val,
|
XA_INTEGER, 32, PropModeReplace, 1, &val,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue