From 3e2443f8386166dbd2586af1d454b766182f04b3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 10 Mar 2016 11:50:53 +0000 Subject: [PATCH] igt/gem_exec_nop: Fix logical inversion for checking of valid execbuf Only if the trial __gem_execbuf reports an error do we want to remove the fancy LUT flags. Signed-off-by: Chris Wilson --- benchmarks/gem_syslatency.c | 3 +-- tests/gem_exec_nop.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c index 4a7811d8..f09050c7 100644 --- a/benchmarks/gem_syslatency.c +++ b/benchmarks/gem_syslatency.c @@ -105,7 +105,6 @@ static void *gem_busyspin(void *arg) nengine = 0; for_each_engine(fd, engine) if (!ignore_engine(fd, engine)) engines[nengine++] = engine; - igt_require(nengine); memset(&obj, 0, sizeof(obj)); obj.handle = gem_create(fd, 4096); @@ -116,7 +115,7 @@ static void *gem_busyspin(void *arg) execbuf.buffer_count = 1; execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; - if (__gem_execbuf(fd, &execbuf) == 0) { + if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; gem_execbuf(fd, &execbuf); } diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index 189f749b..c82895bd 100644 --- a/tests/gem_exec_nop.c +++ b/tests/gem_exec_nop.c @@ -72,7 +72,7 @@ static void single(int fd, uint32_t handle, unsigned ring_id, const char *ring_n execbuf.flags = ring_id; execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; - if (__gem_execbuf(fd, &execbuf) == 0) { + if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = ring_id; gem_execbuf(fd, &execbuf); } @@ -127,7 +127,7 @@ static void all(int fd, uint32_t handle) execbuf.buffer_count = 1; execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; - if (__gem_execbuf(fd, &execbuf) == 0) { + if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; gem_execbuf(fd, &execbuf); }