File xf86-video-intel-sdvo_detect.diff of Package xorg-x11-driver-video
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 256d16d..011e1c9 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1756,7 +1756,9 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
xf86OutputPtr output;
I830OutputPrivatePtr intel_output;
struct i830_sdvo_priv *dev_priv;
+ I830Ptr pI830 ;
int i;
+ int val;
unsigned char ch[0x40];
I2CBusPtr i2cbus = NULL, ddcbus;
char name[60];
@@ -1821,16 +1823,15 @@ i830_sdvo_init(ScrnInfoPtr pScrn, int output_device)
}
intel_output->pI2CBus = i2cbus;
-
- /* Read the regs to test if we can talk to the device */
- for (i = 0; i < 0x40; i++) {
- if (!i830_sdvo_read_byte_quiet(output, i, &ch[i])) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "No SDVO device found on SDVO%c\n",
- output_device == SDVOB ? 'B' : 'C');
- xf86OutputDestroy (output);
- return FALSE;
- }
+
+ pI830 = I830PTR(pScrn);
+ val = INREG(SDVOB);
+ if (0 == (val & 0x04)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "No SDVO device found on SDVO%c\n",
+ output_device == SDVOB ? 'B' : 'C');
+ xf86OutputDestroy (output);
+ return FALSE;
}
/* Set up our wrapper I2C bus for DDC. It acts just like the regular I2C