diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-22 21:06:11 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-10-22 21:06:11 +0100 |
commit | 90172d81ea762eeca4cfb3796fab83cff9f0acaa (patch) | |
tree | 5aa0efbab1d264d4db292d378a952ec182fad9bb | |
parent | b7d6f695ddab02b7afef0f1ca3ae132f4fdbfd43 (diff) |
sna: Allow Option DPMS to switch on (but not off)
We start off the system with the screens blanked, waiting the first
dixSaveScreen unblank, where we then apply the accumulated modesets.
This means we have to allow that even if Option DPMS off, and so we
restrict the Option to only enable DPMS (then once enabled they will not
turn off).
References: https://bugs.freedesktop.org/show_bug.cgi?id=98375
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 3e9cf86c..aa637c07 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -296,7 +296,7 @@ static void sna_dpms_set(ScrnInfoPtr scrn, int mode, int flags) DBG(("%s(mode=%d, flags=%d), vtSema=%d => off?=%d\n", __FUNCTION__, mode, flags, scrn->vtSema, mode!=DPMSModeOn)); - if (!scrn->vtSema || sna->flags & SNA_NO_DPMS) + if (!scrn->vtSema) return; /* Opencoded version of xf86DPMSSet(). @@ -308,7 +308,7 @@ static void sna_dpms_set(ScrnInfoPtr scrn, int mode, int flags) * back on. */ if (mode != DPMSModeOn) { - if (sna->mode.hidden == 0) { + if (sna->mode.hidden == 0 && !(sna->flags & SNA_NO_DPMS)) { DBG(("%s: hiding %d outputs\n", __FUNCTION__, config->num_output)); for (i = 0; i < config->num_output; i++) { |