diff options
-rw-r--r-- | src/sna/sna_display.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 943118ba..3c9156bd 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2001,18 +2001,17 @@ sna_crtc_dpms(xf86CrtcPtr crtc, int mode) return; assert(priv); + priv->dpms_mode = mode; - if (mode == DPMSModeOn) { - if (priv->bo == NULL && - !sna_crtc_set_mode_major(crtc, - &crtc->mode, crtc->rotation, - crtc->x, crtc->y)) - sna_crtc_disable(crtc); - } else - sna_crtc_disable(crtc); + if (mode == DPMSModeOn && + priv->bo == NULL && + !sna_crtc_set_mode_major(crtc, + &crtc->mode, crtc->rotation, + crtc->x, crtc->y)) + mode = DPMSModeOff; - if (priv->bo != NULL) - priv->dpms_mode = mode; + if (mode != DPMSModeOn) + sna_crtc_disable(crtc); } void sna_mode_adjust_frame(struct sna *sna, int x, int y) @@ -5553,8 +5552,12 @@ void sna_mode_check(struct sna *sna) mode.crtc_id, mode.mode_valid, mode.fb_id, expected[0], expected[1])); - if (mode.fb_id != expected[0] && mode.fb_id != expected[1]) + if (mode.fb_id != expected[0] && mode.fb_id != expected[1]) { + xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, + "%s: invalid state found on pipe %d, disabling CRTC:%d\n", + __FUNCTION__, sna_ctrtc->pipe, sna_crtc->id); sna_crtc_disable(crtc); + } } for (i = 0; i < config->num_output; i++) { |