diff options
-rw-r--r-- | lib/igt_gt.c | 10 | ||||
-rw-r--r-- | lib/igt_gt.h | 6 | ||||
-rw-r--r-- | tests/gem_busy.c | 16 |
3 files changed, 20 insertions, 12 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c index 6d827826..3207e515 100644 --- a/lib/igt_gt.c +++ b/lib/igt_gt.c @@ -537,3 +537,13 @@ unsigned intel_detect_and_clear_missed_interrupts(int fd) return missed; } + +const struct intel_execution_engine intel_execution_engines[] = { + { "render", I915_EXEC_RENDER, 0 }, + { "bsd", I915_EXEC_BSD, 0 }, + { "bsd1", I915_EXEC_BSD, 1<<13 /*I915_EXEC_BSD_RING1*/ }, + { "bsd2", I915_EXEC_BSD, 2<<13 /*I915_EXEC_BSD_RING2*/ }, + { "blt", I915_EXEC_BLT, 0 }, + { "vebox", I915_EXEC_VEBOX, 0 }, + { NULL, 0, 0 } +}; diff --git a/lib/igt_gt.h b/lib/igt_gt.h index 4cf898a2..d4a582e2 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -91,4 +91,10 @@ void igt_clflush_range(void *addr, int size); unsigned intel_detect_and_clear_missed_interrupts(int fd); +extern const struct intel_execution_engine { + const char *name; + unsigned exec_id; + unsigned flags; +} intel_execution_engines[]; + #endif /* IGT_GT_H */ diff --git a/tests/gem_busy.c b/tests/gem_busy.c index d99806f4..f6710de8 100644 --- a/tests/gem_busy.c +++ b/tests/gem_busy.c @@ -223,6 +223,7 @@ static bool has_semaphores(int fd) igt_main { + const struct intel_execution_engine *e; int fd = -1; igt_skip_on_simulation(); @@ -232,18 +233,9 @@ igt_main igt_require(has_semaphores(fd)); } - igt_subtest("render") - test_ring(fd, I915_EXEC_RENDER, 0); - igt_subtest("bsd") - test_ring(fd, I915_EXEC_BSD, 0); - igt_subtest("bsd1") - test_ring(fd, I915_EXEC_BSD, 1<<13 /*I915_EXEC_BSD_RING1*/); - igt_subtest("bsd2") - test_ring(fd, I915_EXEC_BSD, 2<<13 /*I915_EXEC_BSD_RING2*/); - igt_subtest("blt") - test_ring(fd, I915_EXEC_BLT, 0); - igt_subtest("vebox") - test_ring(fd, I915_EXEC_VEBOX, 0); + for (e = intel_execution_engines; e->name; e++) + igt_subtest_f("%s", e->name) + test_ring(fd, e->exec_id, e->flags); igt_fixture close(fd); |