diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-10-03 17:20:31 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-10-03 17:20:31 +0100 |
commit | 7d60a9be3da1163866573d2ffda9635a914ac795 (patch) | |
tree | fdd4dddb99e049957a49dbea3111eac13750e522 | |
parent | a797c192adcc2b7aa9101089d3ee84b3e4f968ad (diff) |
sna: Update vblank interval after enabling outputs
In a couple of cases we can re-enable CRTC. After doing so we should
recompute the minimum vblank interval.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index d1f39740..b1144bb3 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2355,11 +2355,12 @@ sna_crtc_dpms(xf86CrtcPtr crtc, int mode) assert(priv); priv->dpms_mode = mode; - if (mode == DPMSModeOn && - crtc->enabled && - priv->bo == NULL && - !__sna_crtc_set_mode(crtc)) - mode = DPMSModeOff; + if (mode == DPMSModeOn && crtc->enabled && priv->bo == NULL) { + if (__sna_crtc_set_mode(crtc)) + update_flush_interval(to_sna(crtc->scrn)); + else + mode = DPMSModeOff; + } if (mode != DPMSModeOn) sna_crtc_disable(crtc); @@ -4334,7 +4335,7 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height) xf86CrtcPtr crtc = config->crtc[i]; assert(to_sna_crtc(crtc) != NULL); - if (!crtc->enabled) + if (to_sna_crtc(crtc)->bo == NULL) continue; if (!__sna_crtc_set_mode(crtc)) @@ -5959,6 +5960,8 @@ sna_mode_enable(struct sna *sna) __sna_crtc_set_mode(crtc); } + + update_flush_interval(sna); } void |