Subject: GFX: Initialize the SDVO device based on the valid slave address When the slave address is found for the SDVO port, the SDVO device will be initialzied. Otherwise it will be skipped. --- src/i830_sdvo.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) Index: xf86-video-intel/src/i830_sdvo.c =================================================================== --- xf86-video-intel.orig/src/i830_sdvo.c 2009-05-26 13:02:01.000000000 +0800 +++ xf86-video-intel/src/i830_sdvo.c 2009-05-26 13:38:00.000000000 +0800 @@ -50,6 +50,7 @@ #include "i810_reg.h" #include "i830_sdvo_regs.h" #include "X11/Xatom.h" +#include "i830_bios.h" /** SDVO driver private structure. */ struct i830_sdvo_priv { @@ -2115,7 +2116,19 @@ int i; unsigned char ch[0x40]; I2CBusPtr i2cbus = NULL, ddcbus; + uint8_t slave_addr; + int ret_value; + slave_addr = 0; + ret_value = find_sdvo_slave(output_device, &slave_addr); + if (ret_value) { + /* No slave address can be found for the SDVO port */ + /* return false */ + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Skip the detecion of SDVO%s\n", + (output_device == SDVOB)?"B":"C"); + return FALSE; + } output = xf86OutputCreate (pScrn, &i830_sdvo_output_funcs,NULL); if (!output) return FALSE; @@ -2150,14 +2163,12 @@ xf86OutputDestroy (output); return FALSE; } - if (output_device == SDVOB) { dev_priv->d.DevName = "SDVO Controller B"; - dev_priv->d.SlaveAddr = 0x70; } else { dev_priv->d.DevName = "SDVO Controller C"; - dev_priv->d.SlaveAddr = 0x72; } + dev_priv->d.SlaveAddr = slave_addr; dev_priv->d.pI2CBus = i2cbus; dev_priv->d.DriverPrivate.ptr = output; dev_priv->output_device = output_device;