summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-14 19:26:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-14 19:26:42 +0100
commit3a56a0b10eb3ab07efd28efdc79d0fd3a6fa20ff (patch)
tree8eda2e9e3e2f206f246881776f54b936aa20ecc3 /src/sna/sna_display.c
parentb415ca05c2e1c4f09f85d8769d39e5369661ed3a (diff)
sna: Make the disable-unused after vt switch distinct from DPMS off
So that we do not lose control over dpms on/off! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r--src/sna/sna_display.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index a198b5cf..de834ae9 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -515,9 +515,20 @@ sna_crtc_dpms(xf86CrtcPtr crtc, int mode)
{
DBG(("%s(pipe %d, dpms mode -> %d):= active=%d\n",
__FUNCTION__, to_sna_crtc(crtc)->pipe, mode, mode == DPMSModeOn));
+}
+
+void sna_mode_disable_unused(struct sna *sna)
+{
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(sna->scrn);
+ int i;
- if (mode == DPMSModeOff)
- sna_crtc_disable(crtc);
+ DBG(("%s\n", __FUNCTION__));
+
+ /* Force consistency between kernel and ourselves */
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ if (!xf86_config->crtc[i]->enabled)
+ sna_crtc_disable(xf86_config->crtc[i]);
+ }
}
static struct kgem_bo *sna_create_bo_for_fbcon(struct sna *sna,