lib: Magic for_each_engine() macro to iterate over available engines

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2016-03-04 10:19:38 +00:00
parent 60eafc5489
commit 697c3f5550
2 changed files with 13 additions and 4 deletions
+4 -4
View File
@@ -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)