PATCH: make driver compile without ATOM_BIOS
I'm sure this patch is wrong, but makes the driver compile again without ATOM_BIOS. diff --git a/src/rhd_i2c.c b/src/rhd_i2c.c index 3ab2659..7471a75 100644 --- a/src/rhd_i2c.c +++ b/src/rhd_i2c.c @@ -366,20 +366,24 @@ rhdRS69I2CStatus(I2CBusPtr I2CPtr) static Bool rhdRS69I2CSetupStatus(I2CBusPtr I2CPtr, int line, int prescale) { - AtomBiosArgRec atomBiosArg; CARD32 ddc; - RHDPtr rhdPtr = RHDPTR(xf86Screens[I2CPtr->scrnIndex]); - RHDFUNC(I2CPtr); +#ifdef ATOM_BIOS + AtomBiosArgRec atomBiosArg; + RHDPtr rhdPtr = RHDPTR(xf86Screens[I2CPtr->scrnIndex]); + atomBiosArg.val = line & 0xf; if (ATOM_SUCCESS != RHDAtomBiosFunc(rhdPtr->scrnIndex, rhdPtr->atomBIOS, ATOM_GPIO_I2C_CLK_MASK, &atomBiosArg)) return FALSE; +#endif RHDRegMask(I2CPtr, 0x28, 0x200, 0x200); RHDRegMask(I2CPtr, RS69_DC_I2C_UNKNOWN_1, prescale << 16 | 0x2, 0xffff00ff); + +#ifdef ATOM_BIOS /* add SDVO handling later */ switch (atomBiosArg.val) { case 0x1f90: @@ -394,6 +398,9 @@ rhdRS69I2CSetupStatus(I2CBusPtr I2CPtr, int line, int prescale) } RHDDebug(I2CPtr->scrnIndex,"%s: DDC Line: %i val: %i port: 0x%x\n", __func__,line & 0xf, ddc, atomBiosArg.val); +#else + ddc = 2; +#endif RHDRegMask(I2CPtr, RS69_DC_I2C_CONTROL, ddc << 8, 0xff << 8); RHDRegWrite(I2CPtr, RS69_DC_I2C_DDC_SETUP_Q, 0x30000000); -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Tue, Jan 29, 2008 at 07:50:00PM +0100, Thomas Meyer wrote:
I'm sure this patch is wrong, but makes the driver compile again without ATOM_BIOS.
I pushed up a slightly different version, but nice work though, good catch. Thanks. Luc Verhaegen. SUSE/Novell X Driver Developer. -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
participants (2)
-
Luc Verhaegen
-
Thomas Meyer