xf86-video-ati: Branch 'atom-tvout'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Dec 17 02:37:00 PST 2008


 src/atombios_output.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 6bfbb930c549e67f68969f7f0483380417f755b5
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Wed Dec 17 05:36:09 2008 -0500

    Make sure we hit the right bios reg

diff --git a/src/atombios_output.c b/src/atombios_output.c
index a687bea..0de008a 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -843,19 +843,24 @@ atombios_output_yuv_setup(xf86OutputPtr output, Bool enable)
     AtomBiosArgRec data;
     unsigned char *space;
     unsigned char *RADEONMMIO = info->MMIO;
-    uint32_t temp;
+    uint32_t temp, reg;
+
+    if (info->ChipFamily >= CHIP_FAMILY_R600)
+	reg = R600_BIOS_3_SCRATCH;
+    else
+	reg = RADEON_BIOS_3_SCRATCH;
 
     //fix up scratch reg handling
     temp = INREG(R600_BIOS_3_SCRATCH);
     if ((radeon_output->MonType == MT_CTV) ||
 	(radeon_output->MonType == MT_STV))
-	OUTREG(R600_BIOS_3_SCRATCH, (ATOM_S3_TV1_ACTIVE |
-				     (radeon_crtc->crtc_id << 18)));
+	OUTREG(reg, (ATOM_S3_TV1_ACTIVE |
+		     (radeon_crtc->crtc_id << 18)));
     else if (radeon_output->MonType == MT_CV)
-	OUTREG(R600_BIOS_3_SCRATCH, (ATOM_S3_CV_ACTIVE |
-				     (radeon_crtc->crtc_id << 24)));
+	OUTREG(reg, (ATOM_S3_CV_ACTIVE |
+		     (radeon_crtc->crtc_id << 24)));
     else
-	OUTREG(R600_BIOS_3_SCRATCH, 0);
+	OUTREG(reg, 0);
 
     memset(&disp_data, 0, sizeof(disp_data));
 
@@ -869,13 +874,13 @@ atombios_output_yuv_setup(xf86OutputPtr output, Bool enable)
 
     if (RHDAtomBiosFunc(info->atomBIOS->scrnIndex, info->atomBIOS, ATOMBIOS_EXEC, &data) == ATOM_SUCCESS) {
 
-	OUTREG(R600_BIOS_3_SCRATCH, temp);
+	OUTREG(reg, temp);
 
 	ErrorF("crtc %d YUV %s setup success\n", radeon_crtc->crtc_id, enable ? "enable" : "disable");
 	return ATOM_SUCCESS;
     }
 
-    OUTREG(R600_BIOS_3_SCRATCH, temp);
+    OUTREG(reg, temp);
 
     ErrorF("crtc %d YUV %s setup failed\n", radeon_crtc->crtc_id, enable ? "enable" : "disable");
     return ATOM_NOT_IMPLEMENTED;


More information about the xorg-commit mailing list