summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-05-04 15:38:22 -0700
committerKeith Packard <keithp@keithp.com>2009-05-08 12:35:03 -0700
commitfdbb6fd3d3c0ce7078f8faaf089af51cc36cbcb3 (patch)
treed0bbc304e5d2fbd05ddc54e1d9f4c75a0d02249c
parenteac2b3658aacc8a64dc3c0fd7cc8fd77abcc59af (diff)
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 (cherry picked from commit 94648bb797d94b025746c60679c584e5be2fae28) Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/modes/xf86Crtc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 1c2ee499e..84d3cac3e 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2444,18 +2444,23 @@ _X_EXPORT 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;