summaryrefslogtreecommitdiff
path: root/tests/gem_exec_nop.c
diff options
context:
space:
mode:
authorAntonio Argenziano <antonio.argenziano@intel.com>2018-03-19 15:30:38 -0700
committerAntonio Argenziano <antonio.argenziano@intel.com>2018-03-20 10:44:10 -0700
commit94e886203a99ef19b8319489a45cd348e76e8ccd (patch)
treec26a1fe72268b6049b1aa5b3ffb256e1edc1ef7d /tests/gem_exec_nop.c
parent178e7f3da66cd02660a86257df75708a0efa3bbc (diff)
igt: Replace 'all-engines' magic numbers with macro
In interfaces where a parameter allow to select an engine, we usually use '-1' or '~0u' to select all engines. This patch replaces magic numbers with a named constant. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_nop.c')
-rw-r--r--tests/gem_exec_nop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index d971ffcb..50f0a3aa 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -488,7 +488,7 @@ static void fence_signal(int fd, uint32_t handle,
igt_require(gem_has_exec_fence(fd));
nengine = 0;
- if (ring_id == -1) {
+ if (ring_id == ALL_ENGINES) {
for_each_physical_engine(fd, n)
engines[nengine++] = n;
} else {
@@ -642,7 +642,7 @@ igt_main
}
igt_subtest("signal-all")
- fence_signal(device, handle, -1, "all", 150);
+ fence_signal(device, handle, ALL_ENGINES, "all", 150);
igt_subtest("series")
series(device, handle, 150);