diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-04 10:19:38 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-08 09:57:33 +0000 |
commit | 697c3f5550d8a58901c010635ecb7a76a524d296 (patch) | |
tree | f7c91a895d10d6d5b210023c5258b21dc2f6e725 /tests/gem_exec_suspend.c | |
parent | 60eafc548911d8625d20443a203c5aff3662c39a (diff) |
lib: Magic for_each_engine() macro to iterate over available engines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_suspend.c')
-rw-r--r-- | tests/gem_exec_suspend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_exec_suspend.c b/tests/gem_exec_suspend.c index f468ff4a..86cf644a 100644 --- a/tests/gem_exec_suspend.c +++ b/tests/gem_exec_suspend.c @@ -53,10 +53,10 @@ static void check_bo(int fd, uint32_t handle) static void test_all(int fd) { - const struct intel_execution_engine *e; - for (e = intel_execution_engines; e->name; e++) - if (gem_has_ring(fd, e->exec_id | e->flags)) - run_test(fd, e->exec_id | e->flags, NOSLEEP); + unsigned engine; + + for_each_engine(fd, engine) + run_test(fd, engine, NOSLEEP); } static void run_test(int fd, unsigned ring, enum mode mode) |