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>
This commit is contained in:
Chris Wilson 2016-10-22 21:06:11 +01:00
parent b7d6f695dd
commit 90172d81ea
1 changed files with 2 additions and 2 deletions

View File

@ -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++) {