diff --git a/U_radeon-pad-CS-to-8-DW.patch b/U_radeon-pad-CS-to-8-DW.patch new file mode 100644 index 0000000..06317a3 --- /dev/null +++ b/U_radeon-pad-CS-to-8-DW.patch @@ -0,0 +1,31 @@ +From 58d008883165ba35c83041fa9ed84937163d5f76 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Fri, 6 Sep 2013 15:58:56 -0400 +Subject: [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. + +Signed-off-by: Alex Deucher +--- + radeon/radeon_cs_gem.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c +index b963140..b87c6b1 100644 +--- a/radeon/radeon_cs_gem.c ++++ b/radeon/radeon_cs_gem.c +@@ -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 +-- +1.8.4 + diff --git a/libdrm.changes b/libdrm.changes index 3010714..e4ae383 100644 --- a/libdrm.changes +++ b/libdrm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Sep 17 17:49:28 UTC 2013 - hrvoje.senjan@gmail.com + +- Added U_radeon-pad-CS-to-8-DW.patch from upstream -- aligns the + IB to 8 DWs. r6xx also require at least 4 DW alignment to avoid + a hw bug. + ------------------------------------------------------------------- Fri Aug 30 00:28:37 CEST 2013 - ro@suse.de diff --git a/libdrm.spec b/libdrm.spec index 5a15179..d4333c6 100644 --- a/libdrm.spec +++ b/libdrm.spec @@ -39,6 +39,9 @@ Source2: baselibs.conf # PATCH-FIX-UPSTREAM libdrm-implicit-defs.diff fdo#48599 -- Fix compiler warnings in tests/radeon/radeon_ttm.c Patch1: libdrm-implicit-defs.diff Patch2: u_Fix-compilation-on-systems-that-don-t-provide-O_CLOE.patch +# PATCH-FIX-UPSTREAM U_radeon-pad-CS-to-8-DW.patch -- Aligns the IB to 8 DWs. r6xx also require at least 4 DW +# alignment to avoid a hw bug. +Patch3: U_radeon-pad-CS-to-8-DW.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf >= 2.63 @@ -156,6 +159,7 @@ Group: System/Libraries %setup -q %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"