diff options
author | Alex Deucher <alex@botch2.(none)> | 2008-03-05 10:40:06 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2008-03-05 10:40:06 -0500 |
commit | 2901e99f1942842856cd39c1dcc8b22f3cf7d9e3 (patch) | |
tree | de5b236a10fca9d07430219a8dc87a01934c2b61 | |
parent | 74eb981287d76836327830bd51272f605a07e0cc (diff) |
RADEON: fix fetching of dac2 adj values from newer bios tables
-rw-r--r-- | src/radeon_bios.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c index 8e6bd8dc..3848e601 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -628,7 +628,21 @@ Bool RADEONGetDAC2InfoFromBIOS (xf86OutputPtr output) offset = RADEON_BIOS16(info->ROMHeaderStart + 0x32); if (offset) { rev = RADEON_BIOS8(offset + 0x3); - if (rev > 1) { + if (rev > 4) { + bg = RADEON_BIOS8(offset + 0xc) & 0xf; + dac = RADEON_BIOS8(offset + 0xd) & 0xf; + radeon_output->ps2_tvdac_adj = (bg << 16) | (dac << 20); + + bg = RADEON_BIOS8(offset + 0xe) & 0xf; + dac = RADEON_BIOS8(offset + 0xf) & 0xf; + radeon_output->pal_tvdac_adj = (bg << 16) | (dac << 20); + + bg = RADEON_BIOS8(offset + 0x10) & 0xf; + dac = RADEON_BIOS8(offset + 0x11) & 0xf; + radeon_output->ntsc_tvdac_adj = (bg << 16) | (dac << 20); + + return TRUE; + } else if (rev > 1) { bg = RADEON_BIOS8(offset + 0xc) & 0xf; dac = (RADEON_BIOS8(offset + 0xc) >> 4) & 0xf; radeon_output->ps2_tvdac_adj = (bg << 16) | (dac << 20); @@ -656,6 +670,14 @@ Bool RADEONGetDAC2InfoFromBIOS (xf86OutputPtr output) radeon_output->ntsc_tvdac_adj = radeon_output->ps2_tvdac_adj; return TRUE; + } else { + bg = RADEON_BIOS8(offset + 0x4) & 0xf; + dac = RADEON_BIOS8(offset + 0x5) & 0xf; + radeon_output->ps2_tvdac_adj = (bg << 16) | (dac << 20); + radeon_output->pal_tvdac_adj = radeon_output->ps2_tvdac_adj; + radeon_output->ntsc_tvdac_adj = radeon_output->ps2_tvdac_adj; + + return TRUE; } } } |