From 80397e84fbf5b83a6906468484e9993c554a353a Mon Sep 17 00:00:00 2001
From: Corbin Simpson <MostAwesomeDude@gmail.com>
Date: Sun, 17 Jan 2010 17:48:16 -0800
Subject: [PATCH] Re-write MSAA registers, if available.

---
 src/radeon_commonfuncs.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/radeon_commonfuncs.c b/src/radeon_commonfuncs.c
index 8c46235..c9aefa3 100644
--- a/src/radeon_commonfuncs.c
+++ b/src/radeon_commonfuncs.c
@@ -116,8 +116,10 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
 	OUT_ACCEL_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE);
 	FINISH_ACCEL();
 
-	if (!info->cs) {
-	    BEGIN_ACCEL(3);
+	if (!info->cs ||
+        info->dri->pKernelDRMVersion->version_minor >= 1 ||
+        info->dri->pKernelDRMVersion->version_patchlevel >= 1) {
+	    BEGIN_ACCEL(2);
 	    OUT_ACCEL_REG(R300_GB_MSPOS0, ((6 << R300_MS_X0_SHIFT) |
 					   (6 << R300_MS_Y0_SHIFT) |
 					   (6 << R300_MS_X1_SHIFT) |
@@ -133,6 +135,11 @@ static void FUNC_NAME(RADEONInit3DEngine)(ScrnInfoPtr pScrn)
 					   (6 << R300_MS_X5_SHIFT) |
 					   (6 << R300_MS_Y5_SHIFT) |
 					   (6 << R300_MSBD1_SHIFT)));
+	    FINISH_ACCEL();
+	}
+
+	if (!info->cs) {
+	    BEGIN_ACCEL(1);
 	    OUT_ACCEL_REG(R300_GA_ENHANCE, R300_GA_DEADLOCK_CNTL | R300_GA_FASTSYNC_CNTL);
 	    FINISH_ACCEL();
 	}
-- 
1.6.5.2

