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>
This commit is contained in:
Chris Wilson 2012-06-14 17:40:09 +01:00
parent 3a56a0b10e
commit 4e50467b4f
3 changed files with 18 additions and 1 deletions

View File

@ -362,6 +362,7 @@ enum {
extern Bool intel_mode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
extern void intel_mode_init(struct intel_screen_private *intel);
extern void intel_mode_disable_unused_functions(ScrnInfoPtr scrn);
extern void intel_mode_remove_fb(intel_screen_private *intel);
extern void intel_mode_fini(intel_screen_private *intel);

View File

@ -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

View File

@ -1068,6 +1068,7 @@ static Bool I830EnterVT(VT_FUNC_ARGS_DECL)
if (!xf86SetDesiredModes(scrn))
return FALSE;
intel_mode_disable_unused_functions(scrn);
return TRUE;
}