From 95985256efa7e86cefe4b1541780eda12c0c8f89 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 16 May 2008 10:51:32 -0400 Subject: [PATCH] xf86SetDesiredModes(): Skip disabled CRTCs first thing. (cherry picked from commit 14726b776d6cebb7d864b6ffa7554e1ce5637d5c) --- hw/xfree86/modes/xf86Crtc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 57fc2c784..e857b077a 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2188,6 +2188,10 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) xf86OutputPtr output = NULL; int o; + /* Skip disabled CRTCs */ + if (!crtc->enabled) + continue; + if (config->output[config->compat_output]->crtc == crtc) output = config->output[config->compat_output]; else @@ -2199,9 +2203,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) break; } } - /* - * Skip disabled crtcs - */ + /* paranoia */ if (!output) continue;