From 90172d81ea762eeca4cfb3796fab83cff9f0acaa Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 22 Oct 2016 21:06:11 +0100 Subject: 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 --- src/sna/sna_driver.c | 4 ++-- 1 file 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++) { -- cgit v1.2.3