xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Mon Apr 14 17:13:52 PDT 2008


 src/radeon_commonfuncs.c |   37 +++++++++++++++++++++++++------------
 src/radeon_driver.c      |    6 +-----
 2 files changed, 26 insertions(+), 17 deletions(-)

New commits:
commit 1286fe5ce1c77453d57817b9b26b1bdb32ca7bc8
Author: Alex Deucher <alex at botch2.(none)>
Date:   Mon Apr 14 20:02:14 2008 -0400

    R300+: properly setup vap_cntl
    
    this fixes tcl/pvs on RV515 among other things

diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 66edc72..1976805 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -55,14 +55,12 @@
 static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
-    CARD32 gb_tile_config, su_reg_dest;
+    CARD32 gb_tile_config, su_reg_dest, vap_cntl;
     ACCEL_PREAMBLE();
 
     info->texW[0] = info->texH[0] = info->texW[1] = info->texH[1] = 1;
 
-    if (IS_R300_VARIANT || IS_AVIVO_VARIANT ||
-	(info->ChipFamily == CHIP_FAMILY_RS690) ||
-	(info->ChipFamily == CHIP_FAMILY_RS740)) {
+    if (IS_R300_3D || IS_R500_3D) {
 
 	BEGIN_ACCEL(3);
 	OUT_ACCEL_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D);
@@ -147,20 +145,35 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
 	OUT_ACCEL_REG(R300_SU_DEPTH_OFFSET, 0);
 	FINISH_ACCEL();
 
-	/* setup the VAP */	
+	/* setup the VAP */
+	vap_cntl = ((5 << R300_PVS_NUM_SLOTS_SHIFT) |
+		    (5 << R300_PVS_NUM_CNTLRS_SHIFT) |
+		    (9/*12*/ << R300_VF_MAX_VTX_NUM_SHIFT));
+
+	if (info->ChipFamily == CHIP_FAMILY_RV515)
+	    vap_cntl |= (2 << R300_PVS_NUM_FPUS_SHIFT);
+	else if (info->ChipFamily == CHIP_FAMILY_RV530)
+	    vap_cntl |= (5 << R300_PVS_NUM_FPUS_SHIFT);
+	else if (info->ChipFamily == CHIP_FAMILY_R420)
+	    vap_cntl |= (6 << R300_PVS_NUM_FPUS_SHIFT);
+	else if (info->ChipFamily == CHIP_FAMILY_R520)
+	    vap_cntl |= (8 << R300_PVS_NUM_FPUS_SHIFT);
+	else if (info->ChipFamily == CHIP_FAMILY_RV530)
+	    vap_cntl |= (5 << R300_PVS_NUM_FPUS_SHIFT);
+	else
+	    vap_cntl |= (4 << R300_PVS_NUM_FPUS_SHIFT);
+
 	if (info->has_tcl)
 	    BEGIN_ACCEL(15);
 	else
-	    BEGIN_ACCEL(9);
+	    BEGIN_ACCEL(8);
 	OUT_ACCEL_REG(R300_VAP_VTX_STATE_CNTL, 0);
 	OUT_ACCEL_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0);
-	OUT_ACCEL_REG(R300_VAP_CNTL, ((5/*6*/ << R300_PVS_NUM_SLOTS_SHIFT) |
-				      (5 << R300_PVS_NUM_CNTLRS_SHIFT) |
-				      (4 << R300_PVS_NUM_FPUS_SHIFT) |
-				      (9/*12*/ << R300_VF_MAX_VTX_NUM_SHIFT)));
-	if (info->has_tcl)
+
+	if (info->has_tcl) {
 	    OUT_ACCEL_REG(R300_VAP_CNTL_STATUS, 0);
-	else
+	    OUT_ACCEL_REG(R300_VAP_CNTL, vap_cntl);
+	}else
 	    OUT_ACCEL_REG(R300_VAP_CNTL_STATUS, R300_PVS_BYPASS);
 	OUT_ACCEL_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0);
 	OUT_ACCEL_REG(R300_VAP_VTE_CNTL, R300_VTX_XY_FMT | R300_VTX_Z_FMT);
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 3d4f05f..e77ea16 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1795,11 +1795,7 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
 	(info->ChipFamily == CHIP_FAMILY_RS740))
 	info->has_tcl = FALSE;
     else {
-	/* need to sort out why PVS has issues on RV515 */
-	if (info->ChipFamily == CHIP_FAMILY_RV515)
-	    info->has_tcl = FALSE;
-	else
-	    info->has_tcl = TRUE;
+	info->has_tcl = TRUE;
     }
 
     return TRUE;


More information about the xorg-commit mailing list