[PATCH i-g-t v3] tests/gem_exec_params: check invalid flags for Resource Streamer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make sure resource streamer flags works only in correct ring in
addition to checking next flag after the RS boundary fails.

v2: Make sure we reject RS on pre-hsw.
v3: Don't skip 1<<15 for the exec flags (Jani Nikula)

Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>
---
 tests/gem_exec_params.c | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 54f0dc3..e9c13a4 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -48,6 +48,7 @@
 #define LOCAL_I915_EXEC_BSD_MASK (3<<13)
 #define LOCAL_I915_EXEC_BSD_RING1 (1<<13)
 #define LOCAL_I915_EXEC_BSD_RING2 (2<<13)
+#define LOCAL_I915_EXEC_RESOURCE_STREAMER (1<<15)
 
 struct drm_i915_gem_execbuffer2 execbuf;
 struct drm_i915_gem_exec_object2 gem_exec[1];
@@ -220,7 +221,7 @@ igt_main
 	/* HANDLE_LUT and NO_RELOC are already exercised by gem_exec_lut_handle */
 
 	igt_subtest("invalid-flag") {
-		execbuf.flags = I915_EXEC_RENDER | (I915_EXEC_HANDLE_LUT << 1);
+		execbuf.flags = I915_EXEC_RENDER | (LOCAL_I915_EXEC_RESOURCE_STREAMER << 1);
 		RUN_FAIL(EINVAL);
 	}
 
@@ -234,6 +235,30 @@ igt_main
 		execbuf.num_cliprects = 0;
 	}
 
+	igt_subtest("rs-invalid-on-bsd-ring") {
+		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
+		execbuf.flags = I915_EXEC_BSD | LOCAL_I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("rs-invalid-on-blt-ring") {
+		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
+		execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("rs-invalid-on-vebox-ring") {
+		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
+		execbuf.flags = I915_EXEC_VEBOX | LOCAL_I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("rs-invalid-gen") {
+		igt_require(!IS_HASWELL(devid) && intel_gen(devid) < 8);
+		execbuf.flags = I915_EXEC_RENDER | LOCAL_I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux