All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH] tests/gem_exec_params: check invalid flags for Resource Streamer
Date: Tue, 19 May 2015 11:30:44 +0300	[thread overview]
Message-ID: <1432024244-13770-1-git-send-email-abdiel.janulgue@linux.intel.com> (raw)

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

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 tests/gem_exec_params.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 54f0dc3..08ee330 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<<16)
 
 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,24 @@ 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);
+	}
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
-- 
1.9.1

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

             reply	other threads:[~2015-05-19  8:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  8:30 Abdiel Janulgue [this message]
2015-05-19  9:40 ` [PATCH] tests/gem_exec_params: check invalid flags for Resource Streamer Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432024244-13770-1-git-send-email-abdiel.janulgue@linux.intel.com \
    --to=abdiel.janulgue@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.