From 14726b776d6cebb7d864b6ffa7554e1ce5637d5c 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. --- 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 1a49cb532..58c3512f8 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2244,6 +2244,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 @@ -2255,9 +2259,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) break; } } - /* - * Skip disabled crtcs - */ + /* paranoia */ if (!output) continue;