diff --git a/src/i830_crt.c b/src/i830_crt.c index 2e70eb8..def311b 100644 --- a/src/i830_crt.c +++ b/src/i830_crt.c @@ -339,12 +339,16 @@ static Bool i830_crt_detect_ddc(xf86OutputPtr output) { I830OutputPrivatePtr i830_output = output->driver_private; + Bool output_detected; /* CRT should always be at 0, but check anyway */ if (i830_output->type != I830_OUTPUT_ANALOG) return FALSE; - return xf86I2CProbeAddress(i830_output->pDDCBus, 0x00A0); + /* Set up the DDC bus. */ + I830I2CInit(pScrn, &i830_output->pDDCBus, GPIOA, "CRTDDC_A"); + output_detected = xf86I2CProbeAddress(i830_output->pDDCBus, 0x00A0); + xf86DestroyI2CBusRec(intel_output->pDDCBus, TRUE, TRUE); } /** @@ -426,10 +430,10 @@ i830_get_edid(xf86OutputPtr output, int gpio_reg, char *gpio_str) { I830OutputPrivatePtr intel_output = output->driver_private; xf86MonPtr edid_mon = NULL; + I2CBusPtr save_gpioa; /* Set up the DDC bus. */ - if (gpio_reg != GPIOA) - I830I2CInit(output->scrn, &intel_output->pDDCBus, gpio_reg, gpio_str); + I830I2CInit(output->scrn, &intel_output->pDDCBus, gpio_reg, gpio_str); edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus); @@ -509,7 +513,4 @@ i830_crt_init(ScrnInfoPtr pScrn) output->driver_private = i830_output; output->interlaceAllowed = FALSE; output->doubleScanAllowed = FALSE; - - /* Set up the DDC bus. */ - I830I2CInit(pScrn, &i830_output->pDDCBus, GPIOA, "CRTDDC_A"); }