From afd7428690d87097117ab20335658f6d59d60103 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 17 Mar 2008 14:55:44 -0700 Subject: [PATCH] Cleanup logic in xf86PrepareOutputs Should have done this in the first place. Since we're checking for the absence of the get_crtc callback in the first place, we'll short circuit the later call and disable the output, so the ugly "continue" block is unnecesary. --- hw/xfree86/modes/xf86Crtc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 536b53033..8c2b24786 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -2047,13 +2047,9 @@ xf86PrepareOutputs (ScrnInfoPtr scrn) for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; #if RANDR_GET_CRTC_INTERFACE - /* If we can't get the current CRTC, play it safe */ - if (!output->funcs->get_crtc) { - (*output->funcs->dpms)(output, DPMSModeOff); - continue; - } /* Disable outputs that are unused or will be re-routed */ - if (output->crtc != (*output->funcs->get_crtc)(output) || + if (!output->funcs->get_crtc || + output->crtc != (*output->funcs->get_crtc)(output) || output->crtc == NULL) #endif (*output->funcs->dpms)(output, DPMSModeOff);