diff options
author | Jesse Barnes <jbarnes@jbarnes-t61.(none)> | 2008-03-17 14:55:44 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@jbarnes-t61.(none)> | 2008-03-17 14:55:44 -0700 |
commit | afd7428690d87097117ab20335658f6d59d60103 (patch) | |
tree | dbd24b905c8ea364ff3d10fc0f740f4536e797c2 /hw | |
parent | ba85caacb565b9aa0aeace52a362350304b0566d (diff) |
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.
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 8 |
1 files 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); |