summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_fence.c
diff options
context:
space:
mode:
authorKuoppala, Mika <mika.kuoppala@intel.com>2019-11-13 17:49:09 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2019-11-15 00:12:42 +0000
commit9e57f8a51d59b3ffe4002d761fe0315d733bd66e (patch)
tree131e7428afdc057e260911fb11534b321f7cbb91 /tests/i915/gem_exec_fence.c
parent5343ca6ad8fac39fe4d468f771af72c968404bea (diff)
lib/i915: Add query to detect if engine accepts only ro batches
If cmd parser is mandatory, batch can't be modified post execbuf. Some tests rely on modifying batch post execbuf. Give those tests a method to query if those modifications ever reach the actual engine command stream. v2: pull in the test changes, doh v3: class based query v4: rebase Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_exec_fence.c')
-rw-r--r--tests/i915/gem_exec_fence.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
index 002120bf..fbb11ab2 100644
--- a/tests/i915/gem_exec_fence.c
+++ b/tests/i915/gem_exec_fence.c
@@ -129,6 +129,9 @@ static void test_fence_busy(int fd, unsigned ring, unsigned flags)
uint32_t *batch;
int fence, i, timeout;
+ if ((flags & HANG) == 0)
+ igt_require(gem_engine_has_mutable_submission(fd, ring));
+
gem_quiescent_gpu(fd);
memset(&execbuf, 0, sizeof(execbuf));
@@ -265,6 +268,8 @@ static void test_fence_busy_all(int fd, unsigned flags)
for_each_engine(e, fd) {
int fence, new;
+ if ((flags & HANG) == 0)
+ igt_require(gem_engine_has_mutable_submission(fd, eb_ring(e)));
execbuf.flags = eb_ring(e) | LOCAL_EXEC_FENCE_OUT;
execbuf.rsvd2 = -1;
gem_execbuf_wr(fd, &execbuf);
@@ -321,6 +326,9 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags)
uint32_t *out;
int i;
+ if ((flags & HANG) == 0)
+ igt_require(gem_engine_has_mutable_submission(fd, ring));
+
igt_require(gem_can_store_dword(fd, 0));
out = gem_mmap__wc(fd, scratch, 0, 4096, PROT_WRITE);