xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Mar 5 07:40:19 PST 2008


 src/radeon_bios.c |   24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 2901e99f1942842856cd39c1dcc8b22f3cf7d9e3
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Mar 5 10:40:06 2008 -0500

    RADEON: fix fetching of dac2 adj values from newer bios tables

diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 8e6bd8d..3848e60 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;
 	    }
 	}
     }


More information about the xorg-commit mailing list