summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-09 21:46:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-09 21:47:24 +0100
commitfdb8f490441b0ba91fdf530b982cedc2f2acf122 (patch)
tree05134d9a7651c57143f50753e402ba7356bda8e8
parentc1154ae1070806b8da1aad29f75c9659f2a403df (diff)
sna: Add an extra error message before disabling a CRTC
One of the error paths to disable a pipe was lacking a log message. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c25
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++) {