summaryrefslogtreecommitdiff
path: root/tests/i915/gem_busy.c
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-05-23 07:37:01 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2019-05-23 13:34:32 +0100
commit631f3ac2e78c8d6332afc693bf290ae23d8d5685 (patch)
treea8a8c1779b94ed9d432d2e583aeca26194a8935f /tests/i915/gem_busy.c
parentc6be913012b285bbc7d7a299389d2e0208743ceb (diff)
tests/i915: Restore some BAT coverage
Engine enumerated test names have changed so fast-feedback.testlist needs to be updated. However listing all engines there won't scale. So instead add new tests cases which iterate all engines internally. v2: * Fix basic-all test name. * Fix params to basic (bool false to zero). * Use I915_EXEC_DEFAULT in has_extended_busy_ioctl to workaround stateful contexts for now. * Have only basic-all in BAT. (Chris) v3: * Don't overload I915_EXEC_DEFAULT. (Chris) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Andi Shyti <andi.shyti@intel.com> # v1
Diffstat (limited to 'tests/i915/gem_busy.c')
-rw-r--r--tests/i915/gem_busy.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/i915/gem_busy.c b/tests/i915/gem_busy.c
index 781a3bfa..f3ebb37a 100644
--- a/tests/i915/gem_busy.c
+++ b/tests/i915/gem_busy.c
@@ -417,7 +417,7 @@ static bool has_semaphores(int fd)
static bool has_extended_busy_ioctl(int fd)
{
- igt_spin_t *spin = igt_spin_new(fd, .engine = I915_EXEC_RENDER);
+ igt_spin_t *spin = igt_spin_new(fd, .engine = I915_EXEC_DEFAULT);
uint32_t read, write;
__gem_busy(fd, spin->handle, &read, &write);
@@ -460,6 +460,14 @@ static void basic(int fd, const struct intel_execution_engine2 *e, unsigned flag
igt_spin_free(fd, spin);
}
+static void all(int i915)
+{
+ const struct intel_execution_engine2 *e;
+
+ __for_each_physical_engine(i915, e)
+ basic(i915, e, 0);
+}
+
igt_main
{
const struct intel_execution_engine2 *e;
@@ -477,11 +485,14 @@ igt_main
igt_fork_hang_detector(fd);
}
+ igt_subtest("busy-all") {
+ gem_quiescent_gpu(fd);
+ all(fd);
+ }
+
__for_each_physical_engine(fd, e) {
igt_subtest_group {
- igt_subtest_f("%sbusy-%s",
- e->class == I915_ENGINE_CLASS_RENDER
- ? "basic-" : "", e->name) {
+ igt_subtest_f("busy-%s", e->name) {
gem_quiescent_gpu(fd);
basic(fd, e, 0);
}