diff options
author | Kuoppala, Mika <mika.kuoppala@intel.com> | 2019-11-13 17:49:09 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-11-15 00:12:42 +0000 |
commit | 9e57f8a51d59b3ffe4002d761fe0315d733bd66e (patch) | |
tree | 131e7428afdc057e260911fb11534b321f7cbb91 /tests/i915/gem_exec_nop.c | |
parent | 5343ca6ad8fac39fe4d468f771af72c968404bea (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_nop.c')
-rw-r--r-- | tests/i915/gem_exec_nop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c index 2ad8aeea..dbedb356 100644 --- a/tests/i915/gem_exec_nop.c +++ b/tests/i915/gem_exec_nop.c @@ -123,6 +123,7 @@ static void poll_ring(int fd, unsigned engine, const char *name, int timeout) gem_require_ring(fd, engine); igt_require(gem_can_store_dword(fd, engine)); + igt_require(gem_engine_has_mutable_submission(fd, engine)); memset(&obj, 0, sizeof(obj)); obj.handle = gem_create(fd, 4096); @@ -234,7 +235,8 @@ static void poll_sequential(int fd, const char *name, int timeout) nengine = 0; for_each_physical_engine(e, fd) { - if (!gem_can_store_dword(fd, eb_ring(e))) + if (!gem_can_store_dword(fd, eb_ring(e)) || + !gem_engine_has_mutable_submission(fd, eb_ring(e))) continue; engines[nengine++] = eb_ring(e); |