From 8cd52893346c647e475e801c5f5267f2f2b75ebe Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 27 Jan 2016 14:17:53 +0000 Subject: [PATCH] igt/gem_cs_tlb: Use common array of rings Signed-off-by: Chris Wilson --- tests/gem_cs_tlb.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/gem_cs_tlb.c b/tests/gem_cs_tlb.c index 7ab34b0f..bb507d82 100644 --- a/tests/gem_cs_tlb.c +++ b/tests/gem_cs_tlb.c @@ -142,6 +142,7 @@ static void run_on_ring(int fd, unsigned ring_id, const char *ring_name) igt_main { + const struct intel_execution_engine *e; int fd = -1; igt_skip_on_simulation(); @@ -149,17 +150,9 @@ igt_main igt_fixture fd = drm_open_driver(DRIVER_INTEL); - igt_subtest("render") - run_on_ring(fd, I915_EXEC_RENDER, "render"); - - igt_subtest("bsd") - run_on_ring(fd, I915_EXEC_BSD, "bsd"); - - igt_subtest("blt") - run_on_ring(fd, I915_EXEC_BLT, "blt"); - - igt_subtest("vebox") - run_on_ring(fd, LOCAL_I915_EXEC_VEBOX, "vebox"); + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("%s", e->name) + run_on_ring(fd, e->exec_id | e->flags, e->name); igt_fixture close(fd);