From f47d461331a032f9bdcf6f63336e848778cec6cc Mon Sep 17 00:00:00 2001 From: George Sapountzis Date: Fri, 15 Feb 2008 18:32:56 +0200 Subject: mach64: minor cosmetic, I2C type --- src/atipreinit.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/atipreinit.c b/src/atipreinit.c index 86ef80d..f89f5b7 100644 --- a/src/atipreinit.c +++ b/src/atipreinit.c @@ -326,7 +326,8 @@ ati_bios_mmedia ScrnInfoPtr pScreenInfo, ATIPtr pATI, CARD8 *BIOS, - unsigned int VideoTable + unsigned int VideoTable, + unsigned int HardwareTable ) { pATI->Audio = ATI_AUDIO_NONE; @@ -368,6 +369,11 @@ ati_bios_mmedia break; } } + + if (HardwareTable > 0) + { + pATI->I2CType = BIOSByte(HardwareTable + 0x06U) & 0x0FU; + } } /* @@ -968,17 +974,15 @@ ATIPreInit if (BIOSWord(ROMTable - 0x02U) >= 0x004AU) { HardwareTable = BIOSWord(ROMTable + 0x48U); - if (((HardwareTable + 0x08U) <= BIOSSize) && - !memcmp(BIOS + HardwareTable, "$ATI", 4)) - pATI->I2CType = BIOSByte(HardwareTable + 0x06U) & 0x0FU; - else + if (((HardwareTable + 0x08U) > BIOSSize) || + (memcmp(BIOS + HardwareTable, "$ATI", 4) != 0)) HardwareTable = 0; } } ati_bios_clock(pScreenInfo, pATI, BIOS, ClockTable, pGDev); - ati_bios_mmedia(pScreenInfo, pATI, BIOS, VideoTable); + ati_bios_mmedia(pScreenInfo, pATI, BIOS, VideoTable, HardwareTable); if (pATI->LCDPanelID >= 0) { -- cgit v1.2.3