Skip to contentSkip to conversation

igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS

PATCH In review Abdiel Janulgue 2 participants 3 messages May 6, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS

Add test that makes sure RS bit only gets executed on BDW and on the render ring.

---
 tests/gem_exec_params.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
tests/gem_exec_params.c +11 -0
index 769969d..a3f765b 100644
@@ -193,6 +193,17 @@ igt_main
 		execbuf.num_cliprects = 0;
 	}
 
+	igt_subtest("rs-not-gen8") {
+                igt_require(intel_gen(devid) != 8);
+                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
+                RUN_FAIL(EINVAL);
+        }
+
+	igt_subtest("invalid-rs-ring") {
+		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 15 lines · Abdiel Janulgue

Add test that makes sure RS bit only gets executed on BDW and on the render ring.

---
 tests/gem_exec_params.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
tests/gem_exec_params.c +0 -0
index 769969d..a3f765b 100644
@@ -193,6 +193,17 @@ igt_main
 		execbuf.num_cliprects = 0;
 	}

tests/gem_exec_params.c igt_main · line 204

Quoted 10 lines
tests/gem_exec_params.c +9 -0
 
+	igt_subtest("rs-not-gen8") {
+                igt_require(intel_gen(devid) != 8);
+                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
+                RUN_FAIL(EINVAL);
+        }
+
+	igt_subtest("invalid-rs-ring") {
+		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);

See Chris comment, but 0 is actually _not_ an invalid ring, but aliases RCS. Yeah, we have a fun api. So this should actually suceed, at least on bdw (and -EINVAL everywhere else).

So you need to explicitly test with some other ring like VCS (I915_EXEC_BSD).
-Daniel

Quoted 12 lines
tests/gem_exec_params.c +2 -0
+	}
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
Signature · 6 lines
1.7.9.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#2 lore raw
Quoted 31 lines · Daniel Vetter
Quoted 15 lines · Abdiel Janulgue

Add test that makes sure RS bit only gets executed on BDW and on the render ring.

---
 tests/gem_exec_params.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
tests/gem_exec_params.c +0 -0
index 769969d..a3f765b 100644
@@ -193,6 +193,17 @@ igt_main
 		execbuf.num_cliprects = 0;
 	}

tests/gem_exec_params.c igt_main · line 204

Quoted 10 lines
tests/gem_exec_params.c +9 -0
 
+	igt_subtest("rs-not-gen8") {
+                igt_require(intel_gen(devid) != 8);
+                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
+                RUN_FAIL(EINVAL);
+        }
+
+	igt_subtest("invalid-rs-ring") {
+		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);

See Chris comment, but 0 is actually _not_ an invalid ring, but aliases RCS. Yeah, we have a fun api. So this should actually suceed, at least on bdw (and -EINVAL everywhere else).

Quoted 2 lines

So you need to explicitly test with some other ring like VCS (I915_EXEC_BSD).

Also you didn't update the invalid-flag subtest ... I wonder why that didn't fail on bdw.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch