summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-01-06 14:30:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-01-06 14:34:25 +0000
commit0138b38dfcd933d080f86cfd33664eeb3f5558a0 (patch)
tree020b513d0a3d621ed5ccb5acdd9db25a0052d8f3
parent28810d5b367942c96acbc696f27105259422a0d1 (diff)
sna: Always treat DPMSModeSuspend/Standby similar to DPMSModeOff
As we assume that Suspend, Standby alias to Off and disable the crtc when switching to any mode other than On, we need to also perform the backlight updates for Suspend,Standby prior to passing the DPMS value onto the kernel. Suggested-by: Alexander Monakov <amonakov@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 5810dd1b..4818cfc4 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2293,7 +2293,7 @@ sna_output_dpms(xf86OutputPtr output, int dpms)
* record the value before the kernel modifies it
* and reapply it afterwards.
*/
- if (dpms == DPMSModeOff)
+ if (dpms != DPMSModeOn)
sna_output_dpms_backlight(output,
sna_output->dpms_mode,
dpms);
@@ -2304,7 +2304,7 @@ sna_output_dpms(xf86OutputPtr output, int dpms)
sna_output->dpms_id,
dpms);
- if (dpms != DPMSModeOff)
+ if (dpms == DPMSModeOn)
sna_output_dpms_backlight(output,
sna_output->dpms_mode,
dpms);