From 0aacdac56fc3179b1fe6bc28bb1a3beb64c64619 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 9 Mar 2016 21:06:16 +0000 Subject: 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 --- tests/gem_exec_nop.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3