Index: src/mga_driver.c =================================================================== --- src/mga_driver.c (revision 3394) +++ src/mga_driver.c (working copy) @@ -1175,9 +1175,6 @@ hwp = VGAHWPTR(pScrn); pMga = MGAPTR(pScrn); - if (pMga->is_G200SE) - return NULL; /* boo hiss */ - /* Load DDC if we have the code to use it */ /* This gives us DDC1 */ if (pMga->ddc1Read || pMga->i2cInit) { Index: src/mga_dacG.c =================================================================== --- src/mga_dacG.c (revision 3394) +++ src/mga_dacG.c (working copy) @@ -1133,6 +1133,8 @@ static const int DDC_P2_SCL_MASK = (1 << 2); static const int MAVEN_SDA_MASK = (1 << 4); static const int MAVEN_SCL_MASK = (1 << 5); +static const int DDC_G200SE_SDA_MASK = (1 << 0); +static const int DDC_G200SE_SCL_MASK = (1 << 1); static unsigned int MGAG_ddc1Read(ScrnInfoPtr pScrn) @@ -1215,6 +1217,12 @@ } static void +MGAG200SE_I2CPutBits(I2CBusPtr b, int clock, int data) +{ + MGAG_I2CPutBits(b, clock, data, DDC_G200SE_SCL_MASK, DDC_G200SE_SDA_MASK); +} + +static void MGAG_DDC_P1_I2CGetBits(I2CBusPtr b, int *clock, int *data) { MGAG_I2CGetBits(b, clock, data, DDC_P1_SCL_MASK, DDC_P1_SDA_MASK); @@ -1229,6 +1237,11 @@ { MGAG_I2CGetBits(b, clock, data, MAVEN_SCL_MASK, MAVEN_SDA_MASK); } +static void +MGAG200SE_I2CGetBits(I2CBusPtr b, int *clock, int *data) +{ + MGAG_I2CGetBits(b, clock, data, DDC_G200SE_SCL_MASK, DDC_G200SE_SDA_MASK); +} Bool MGAG_i2cInit(ScrnInfoPtr pScrn) @@ -1244,10 +1257,16 @@ I2CPtr->BusName = "DDC P1"; I2CPtr->scrnIndex = pScrn->scrnIndex; - I2CPtr->I2CPutBits = MGAG_DDC_P1_I2CPutBits; - I2CPtr->I2CGetBits = MGAG_DDC_P1_I2CGetBits; I2CPtr->AcknTimeout = 5; + if (pMga->is_G200SE){ + I2CPtr->I2CPutBits = MGAG200SE_I2CPutBits; + I2CPtr->I2CGetBits = MGAG200SE_I2CGetBits; + } else { + I2CPtr->I2CPutBits = MGAG_DDC_P1_I2CPutBits; + I2CPtr->I2CGetBits = MGAG_DDC_P1_I2CGetBits; + } + if (!xf86I2CBusInit(I2CPtr)) { xf86DestroyI2CBusRec(pMga->DDC_Bus1, TRUE, TRUE); pMga->DDC_Bus1 = NULL;