Skip to contentSkip to conversation

radeon: pad CS to 8 DW

PATCH New Alex Deucher 1 participant 1 message Sep 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radeon: pad CS to 8 DW

Aligns the IB to 8 DWs. The aligns the IB to the
CP fetch size. r6xx also require at least 4 DW
alignment to avoid a hw bug.

---
 radeon/radeon_cs_gem.c | 3 +++
 1 file changed, 3 insertions(+)
radeon/radeon_cs_gem.c +3 -0
index b963140..b87c6b1 100644
@@ -425,6 +425,9 @@ static int cs_gem_emit(struct radeon_cs_int *cs)
     unsigned i;
     int r;
 
+    while (cs->cdw & 7)
+	radeon_cs_write_dword((struct radeon_cs *)cs, 0x80000000);
+
 #if CS_BOF_DUMP
     cs_gem_dump_bof(cs);
 #endif
Signature · 1 line
1.8.3.1