[igt-dev] [PATCH i-g-t] i915/gem_ringfill: Do a basic pass over all engines simultaneously
Chris Wilson
chris at chris-wilson.co.uk
Mon May 11 09:39:24 UTC 2020
Change the basic pre-mergetest to do a single pass over all engines
simultaneously. This should take no longer than checking a single
engine, while providing just the right amount of stress regardless of
machine size.
v2: Move around the quiescence and requires to avoid calling them from
the children.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala at intel.com>
---
tests/i915/gem_ringfill.c | 31 ++++++++++++++++++++-------
tests/intel-ci/fast-feedback.testlist | 2 +-
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
index a2157bd6f..05b997ed4 100644
--- a/tests/i915/gem_ringfill.c
+++ b/tests/i915/gem_ringfill.c
@@ -178,13 +178,11 @@ static void run_test(int fd, unsigned ring, unsigned flags, unsigned timeout)
struct drm_i915_gem_execbuffer2 execbuf;
igt_hang_t hang;
- gem_require_ring(fd, ring);
- igt_require(gem_can_store_dword(fd, ring));
-
- if (flags & (SUSPEND | HIBERNATE))
+ if (flags & (SUSPEND | HIBERNATE)) {
run_test(fd, ring, 0, 0);
+ gem_quiescent_gpu(fd);
+ }
- gem_quiescent_gpu(fd);
igt_require(setup_execbuf(fd, &execbuf, obj, reloc, ring) == 0);
memset(&hang, 0, sizeof(hang));
@@ -233,10 +231,10 @@ static void run_test(int fd, unsigned ring, unsigned flags, unsigned timeout)
gem_close(fd, obj[1].handle);
gem_close(fd, obj[0].handle);
- gem_quiescent_gpu(fd);
-
- if (flags & (SUSPEND | HIBERNATE))
+ if (flags & (SUSPEND | HIBERNATE)) {
+ gem_quiescent_gpu(fd);
run_test(fd, ring, 0, 0);
+ }
}
igt_main
@@ -287,11 +285,28 @@ igt_main
e->name,
m->suffix) {
igt_skip_on(m->flags & NEWFD && master);
+ gem_require_ring(fd, eb_ring(e));
+ igt_require(gem_can_store_dword(fd, eb_ring(e)));
run_test(fd, eb_ring(e), m->flags, m->timeout);
+ gem_quiescent_gpu(fd);
}
}
}
+ igt_subtest("basic-all") {
+ const struct intel_execution_engine2 *e;
+
+ __for_each_physical_engine(fd, e) {
+ if (!gem_class_can_store_dword(fd, e->class))
+ continue;
+
+ igt_fork(child, 1)
+ run_test(fd, e->flags, 0, 1);
+ }
+
+ igt_waitchildren();
+ }
+
igt_fixture
close(fd);
}
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index 2ccad4386..e2ed0a1d6 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -35,7 +35,7 @@ igt at gem_mmap@basic
igt at gem_mmap_gtt@basic
igt at gem_render_linear_blits@basic
igt at gem_render_tiled_blits@basic
-igt at gem_ringfill@basic-default-forked
+igt at gem_ringfill@basic-all
igt at gem_sync@basic-all
igt at gem_sync@basic-each
igt at gem_tiled_blits@basic
--
2.26.2
More information about the igt-dev
mailing list