Skip to contentSkip to conversation

tests/gem_storedw_loop: skip on gen6 bsd

PATCH In review Thomas Wood 2 participants 3 messages Sep 3, 2015 – Sep 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/gem_storedw_loop: skip on gen6 bsd

---
 tests/gem_storedw_loop.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
tests/gem_storedw_loop.c +11 -2
index 2263397..1bb276e 100644
@@ -144,6 +144,14 @@ struct ring {
 	{ "vebox", I915_EXEC_VEBOX },
 };
 
+static void
+check_test_requirements(int fd, int ringid)
+{
+	gem_require_ring(fd, ringid);
+	igt_skip_on_f(intel_gen(devid) == 6 && ringid == I915_EXEC_BSD,
+		      "MI_STORE_DATA broken on gen6 bsd\n");
+}
+
 igt_main
 {
 	int fd, i;
@@ -166,13 +174,14 @@ igt_main
 	}
 
 	for (i = 0; i < ARRAY_SIZE(rings); i++) {
+
 		igt_subtest_f("basic-%s", rings[i].name) {
-			gem_require_ring(fd, rings[i].id);
+			check_test_requirements(fd, rings[i].id);
 			store_test(rings[i].id, 16*1024);
 		}
 
 		igt_subtest_f("long-%s", rings[i].name) {
-			gem_require_ring(fd, rings[i].id);
+			check_test_requirements(fd, rings[i].id);
 			store_test(rings[i].id, 1024*1024);
 		}
 	}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 tests/gem_storedw_loop: remove redundant ppgtt check

All tests require ppgtt, so checking for it later on has no effect.

---
 tests/gem_storedw_loop.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
tests/gem_storedw_loop.c +1 -6
index 1bb276e..08a6ad6 100644
@@ -45,7 +45,6 @@ IGT_TEST_DESCRIPTION("Basic CS check using MI_STORE_DATA_IMM.");
 static drm_intel_bufmgr *bufmgr;
 struct intel_batchbuffer *batch;
 static drm_intel_bo *target_buffer;
-static int has_ppgtt = 0;
 static int devid;
 
 /*
@@ -57,8 +56,6 @@ emit_store_dword_imm(drm_intel_bo *dest, uint32_t val)
 {
 	int cmd;
 	cmd = MI_STORE_DWORD_IMM;
-	if (!has_ppgtt)
-		cmd |= MI_MEM_VIRTUAL;
 
 	BEGIN_BATCH(4, 0);
 	OUT_BATCH(cmd);
@@ -163,14 +160,12 @@ igt_main
 		bufmgr = drm_intel_bufmgr_gem_init(fd, 4096);
 		igt_assert(bufmgr);
 
-		has_ppgtt = gem_uses_aliasing_ppgtt(fd);
-
 		igt_skip_on_f(intel_gen(devid) < 6,
 			      "MI_STORE_DATA can only use GTT address on gen4+/g33 and "
 			      "needs snoopable mem on pre-gen6\n");
 
 		/* This only works with ppgtt */
-		igt_require(has_ppgtt);
+		igt_require(gem_uses_aliasing_ppgtt(fd));
 	}
 
 	for (i = 0; i < ARRAY_SIZE(rings); i++) {
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to Thomas Wood
Quoted 1 line · Thomas Wood

Bit more commit message would be good, just copypaste the debug output ;-) lgtm otherwise on the patch series.
-Daniel

Quoted 47 lines
---
 tests/gem_storedw_loop.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
tests/gem_storedw_loop.c +11 -2
index 2263397..1bb276e 100644
@@ -144,6 +144,14 @@ struct ring {
 	{ "vebox", I915_EXEC_VEBOX },
 };
 
+static void
+check_test_requirements(int fd, int ringid)
+{
+	gem_require_ring(fd, ringid);
+	igt_skip_on_f(intel_gen(devid) == 6 && ringid == I915_EXEC_BSD,
+		      "MI_STORE_DATA broken on gen6 bsd\n");
+}
+
 igt_main
 {
 	int fd, i;
@@ -166,13 +174,14 @@ igt_main
 	}
 
 	for (i = 0; i < ARRAY_SIZE(rings); i++) {
+
 		igt_subtest_f("basic-%s", rings[i].name) {
-			gem_require_ring(fd, rings[i].id);
+			check_test_requirements(fd, rings[i].id);
 			store_test(rings[i].id, 16*1024);
 		}
 
 		igt_subtest_f("long-%s", rings[i].name) {
-			gem_require_ring(fd, rings[i].id);
+			check_test_requirements(fd, rings[i].id);
 			store_test(rings[i].id, 1024*1024);
 		}
 	}
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx