From 94648bb797d94b025746c60679c584e5be2fae28 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 4 May 2009 15:38:22 -0700 Subject: Don't prepare outputs & crtcs if set_mode_major is present A driver with this hook will take care of preparing the outputs & crtcs, so calling the prepare functions will just cause unnecessary flicker. Fixes bug #21077 --- hw/xfree86/modes/xf86Crtc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index c6eed3377..1b241cd33 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2549,18 +2549,23 @@ Bool xf86SetDesiredModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + xf86CrtcPtr crtc = config->crtc[0]; int c; - xf86PrepareOutputs(scrn); - xf86PrepareCrtcs(scrn); + /* A driver with this hook will take care of this */ + if (!crtc->funcs->set_mode_major) { + xf86PrepareOutputs(scrn); + xf86PrepareCrtcs(scrn); + } for (c = 0; c < config->num_crtc; c++) { - xf86CrtcPtr crtc = config->crtc[c]; xf86OutputPtr output = NULL; int o; RRTransformPtr transform; + crtc = config->crtc[c]; + /* Skip disabled CRTCs */ if (!crtc->enabled) continue; -- cgit v1.2.3