diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-14 17:40:09 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-14 19:44:22 +0100 |
commit | 4e50467b4f50b522a07bedae7ff68b9c37362af8 (patch) | |
tree | e907510c4ba967c6ab2d354234ab02f6f2da2fec /src/intel_display.c | |
parent | 3a56a0b10eb3ab07efd28efdc79d0fd3a6fa20ff (diff) |
uxa: Force the outputs to off for consistency with xf86DisableUnusedFunctions()
Upon a VT switch, we set the desired modes and turn off the DPMS on any
unused output. Make this explicit so that we always maintain consistency
between the kernel and X's list of enabled CRTCs.
References: https://bugs.freedesktop.org/show_bug.cgi?id=50772
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_display.c')
-rw-r--r-- | src/intel_display.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/intel_display.c b/src/intel_display.c index 8de63449..949a822c 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -332,9 +332,24 @@ mode_to_kmode(ScrnInfoPtr scrn, } static void -intel_crtc_dpms(xf86CrtcPtr intel_crtc, int mode) +intel_crtc_dpms(xf86CrtcPtr crtc, int mode) { +} + +void +intel_mode_disable_unused_functions(ScrnInfoPtr scrn) +{ + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); + struct intel_mode *mode = intel_get_screen_private(scrn)->modes; + int i; + /* Force off for consistency between kernel and ddx */ + for (i = 0; i < xf86_config->num_crtc; i++) { + xf86CrtcPtr crtc = xf86_config->crtc[i]; + if (!crtc->enabled) + drmModeSetCrtc(mode->fd, crtc_id(crtc->driver_private), + 0, 0, 0, NULL, 0, NULL); + } } static Bool |