diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-09 21:06:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-09 23:40:21 +0000 |
commit | 0aacdac56fc3179b1fe6bc28bb1a3beb64c64619 (patch) | |
tree | fcb2510ec6456f4ef41a495d68630dd99b46d346 | |
parent | e1ca201fe9ac23e187aeaf5143d9720042aead88 (diff) |
igt/gem_exec_nop: Only combine unique rings
Ignore the default ring as that is purely symbolic. On BSD2 systems it
is similarly useful to ignore the symbolic BSD ring.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | tests/gem_exec_nop.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index 18bcf1eb..189f749b 100644 --- a/tests/gem_exec_nop.c +++ b/tests/gem_exec_nop.c @@ -93,6 +93,17 @@ static void single(int fd, uint32_t handle, unsigned ring_id, const char *ring_n ring_name, count, elapsed(&start, &now)*1e6 / count); } +static bool ignore_engine(int fd, unsigned engine) +{ + if (engine == 0) + return true; + + if (gem_has_bsd2(fd) && engine == I915_EXEC_BSD) + return true; + + return false; +} + static void all(int fd, uint32_t handle) { struct drm_i915_gem_execbuffer2 execbuf; @@ -105,7 +116,8 @@ static void all(int fd, uint32_t handle) nengine = 0; for_each_engine(fd, engine) - engines[nengine++] = engine; + if (!ignore_engine(fd, engine)) engines[nengine++] = engine; + igt_require(nengine); memset(&obj, 0, sizeof(obj)); obj.handle = handle; |