diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-18 12:11:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-05-18 13:06:17 +0100 |
commit | bc7877660c7d7a733ec484e91e2096b8daf2cf0d (patch) | |
tree | 4ade2c9751497fac6a87081920863cce63d14704 /tests/gem_exec_fence.c | |
parent | 49e083a29a0942309c877ea8e9275fa985a5bf25 (diff) |
lib: Refactor testing for ability to use MI_STORE_DATA_IMM
Rather than have the code in multiple locations, put a copy in lib/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_fence.c')
-rw-r--r-- | tests/gem_exec_fence.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c index 8ef5f8fe..59aa8e67 100644 --- a/tests/gem_exec_fence.c +++ b/tests/gem_exec_fence.c @@ -48,11 +48,6 @@ struct sync_merge_data { #define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) #endif -static bool can_mi_store_dword(int gen, unsigned engine) -{ - return !(gen == 6 && (engine & ~(3<<13)) == I915_EXEC_BSD); -} - static void store(int fd, unsigned ring, int fence, uint32_t target, unsigned offset_value) { const int SCRATCH = 0; @@ -283,7 +278,7 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags) i = 0; for_each_engine(fd, engine) { - if (!can_mi_store_dword(gen, engine)) + if (!gem_can_store_dword(fd, engine)) continue; if (flags & NONBLOCK) { @@ -523,6 +518,7 @@ igt_main igt_subtest_group { igt_fixture { igt_require(gem_has_ring(i915, e->exec_id | e->flags)); + igt_require(gem_can_store_dword(i915, e->exec_id | e->flags)); } igt_subtest_group { |