diff --git a/src/i830_driver.c b/src/i830_driver.c index 9bf0a64..5de8e7d 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -915,19 +915,18 @@ I830SetupOutputs(ScrnInfoPtr pScrn) i830_lvds_init(pScrn); if (IS_I9XX(pI830)) { - if (INREG(SDVOB) & SDVO_DETECTED) { - Bool found = i830_sdvo_init(pScrn, SDVOB); + Bool found; + found = i830_sdvo_init(pScrn, SDVOB); - if (!found && SUPPORTS_INTEGRATED_HDMI(pI830)) - i830_hdmi_init(pScrn, SDVOB); - } + if (!found && SUPPORTS_INTEGRATED_HDMI(pI830) + && (INREG(SDVOB) & SDVO_DETECTED)) + i830_hdmi_init(pScrn, SDVOB); - if (INREG(SDVOC) & SDVO_DETECTED) { - Bool found = i830_sdvo_init(pScrn, SDVOC); + found = i830_sdvo_init(pScrn, SDVOC); - if (!found && SUPPORTS_INTEGRATED_HDMI(pI830)) - i830_hdmi_init(pScrn, SDVOC); - } + if (!found && SUPPORTS_INTEGRATED_HDMI(pI830) + && (INREG(SDVOC) & SDVO_DETECTED)) + i830_hdmi_init(pScrn, SDVOC); } else { i830_dvo_init(pScrn); }