Skip to contentSkip to conversation

tests/gem_cs_prefetch: Fix bdw damage

PATCH New Daniel Vetter 2 participants 3 messages Nov 14, 2013 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/gem_cs_prefetch: Fix bdw damage

---
 tests/gem_cs_prefetch.c | 3 ---
 1 file changed, 3 deletions(-)
tests/gem_cs_prefetch.c +0 -3
index 229a385a2fcd..eb515eadca2e 100644
@@ -133,9 +133,6 @@ int main(int argc, char **argv)
 		/* copy the sample batch with the gpu to the new one, so that we
 		 * also test the unmappable part of the gtt. */
 		BLIT_COPY_BATCH_START(batch->devid, 0);
-		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-			  XY_SRC_COPY_BLT_WRITE_ALPHA |
-			  XY_SRC_COPY_BLT_WRITE_RGB);
 		OUT_BATCH((3 << 24) | /* 32 bits */
 			  (0xcc << 16) | /* copy ROP */
 			  4096);
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 tests/gem_cs_prefetch: Fix bdw damage

v2: Fix more.

---
 lib/intel_batchbuffer.c | 4 +++-
 tests/gem_cs_prefetch.c | 3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)
lib/intel_batchbuffer.c +3 -1
index e284d4870cd6..06a543728579 100644
@@ -239,7 +239,9 @@ intel_blt_copy(struct intel_batchbuffer *batch,
 	       CHECK_RANGE(src_pitch) && CHECK_RANGE(dst_pitch));
 #undef CHECK_RANGE
 
-	BLIT_COPY_BATCH_START(batch->devid, cmd_bits);
+	BEGIN_BATCH(intel_gen(batch->devid) >= 8 ? 10 : 8);
+	OUT_BATCH(XY_SRC_COPY_BLT_CMD | cmd_bits |
+		  (intel_gen(batch->devid) >= 8 ? 8 : 6));
 	OUT_BATCH((br13_bits) |
 		  (0xcc << 16) | /* copy ROP */
 		  dst_pitch);
tests/gem_cs_prefetch.c +0 -3
index 229a385a2fcd..eb515eadca2e 100644
@@ -133,9 +133,6 @@ int main(int argc, char **argv)
 		/* copy the sample batch with the gpu to the new one, so that we
 		 * also test the unmappable part of the gtt. */
 		BLIT_COPY_BATCH_START(batch->devid, 0);
-		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-			  XY_SRC_COPY_BLT_WRITE_ALPHA |
-			  XY_SRC_COPY_BLT_WRITE_RGB);
 		OUT_BATCH((3 << 24) | /* 32 bits */
 			  (0xcc << 16) | /* copy ROP */
 			  4096);
Signature · 1 line
1.8.1.4
#2 lore raw
Quoted 14 lines · Daniel Vetter

v2: Fix more.

---
 lib/intel_batchbuffer.c | 4 +++-
 tests/gem_cs_prefetch.c | 3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)
lib/intel_batchbuffer.c +0 -0
index e284d4870cd6..06a543728579 100644

lib/intel_batchbuffer.c intel_blt_copy(struct intel_batchbuffer *batch, · line 247

Quoted 10 lines
lib/intel_batchbuffer.c +3 -1
@@ -239,7 +239,9 @@ intel_blt_copy(struct intel_batchbuffer *batch,
 	       CHECK_RANGE(src_pitch) && CHECK_RANGE(dst_pitch));
 #undef CHECK_RANGE
 
-	BLIT_COPY_BATCH_START(batch->devid, cmd_bits);
+	BEGIN_BATCH(intel_gen(batch->devid) >= 8 ? 10 : 8);
+	OUT_BATCH(XY_SRC_COPY_BLT_CMD | cmd_bits |
+		  (intel_gen(batch->devid) >= 8 ? 8 : 6));
 	OUT_BATCH((br13_bits) |
 		  (0xcc << 16) | /* copy ROP */
 		  dst_pitch);

I'd vote to just move this into the BLIT_COPY_BATCH_START macro. We already have the devid.

Quoted 5 lines
tests/gem_cs_prefetch.c +0 -0
index 229a385a2fcd..eb515eadca2e 100644

tests/gem_cs_prefetch.c int main(int argc, char **argv) · line 138

Quoted 9 lines
tests/gem_cs_prefetch.c +0 -3
@@ -133,9 +133,6 @@ int main(int argc, char **argv)
 		/* copy the sample batch with the gpu to the new one, so that we
 		 * also test the unmappable part of the gtt. */
 		BLIT_COPY_BATCH_START(batch->devid, 0);
-		OUT_BATCH(XY_SRC_COPY_BLT_CMD |
-			  XY_SRC_COPY_BLT_WRITE_ALPHA |
-			  XY_SRC_COPY_BLT_WRITE_RGB);
 		OUT_BATCH((3 << 24) | /* 32 bits */
 			  (0xcc << 16) | /* copy ROP */
 			  4096);

This hunk was already fixed upstream.

Quoted 3 lines
Signature · 1 line
1.8.1.4
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center