[PATCH] radeon: pad IB to 4 DWs on r6xx asics

Alex Deucher alexdeucher at gmail.com
Wed Sep 4 15:21:20 PDT 2013


Works around a hw bug.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/radeon_kms.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 82e88d4..bf44b63 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -100,6 +100,13 @@ void radeon_cs_flush_indirect(ScrnInfoPtr pScrn)
         info->accel_state->cbuf.vb_start_op = -1;
     }
 
+    /* pad the IB to a multiple of 4 dwords for r6xx */
+    if ((info->ChipFamily >= CHIP_FAMILY_R600) &&
+	(info->ChipFamily <= CHIP_FAMILY_RS880)) {
+	while (info->cs->cdw & 3)
+	    radeon_cs_write_dword(info->cs, 0x80000000);
+    }
+
     radeon_cs_emit(info->cs);
     radeon_cs_erase(info->cs);
 
-- 
1.8.3.1



More information about the xorg-driver-ati mailing list