summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-03-31 15:47:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-04-04 16:35:11 +0100
commit4c89499990a3cd3e6471509aeb89f857526ff38c (patch)
treeb28b547c76a7d439bda863b1a5be221d640e90a3 /tests
parent4b617f43a90fad424da5948095522f62690d3bec (diff)
i915/gem_exec_gttfill: Dynamic active engine tests
Use igt_subtest_with_dynamic for the flexible approach to engine dependent test discovery. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/i915/gem_exec_gttfill.c44
-rw-r--r--tests/intel-ci/blacklist.txt1
2 files changed, 24 insertions, 21 deletions
diff --git a/tests/i915/gem_exec_gttfill.c b/tests/i915/gem_exec_gttfill.c
index 6e78a7aa..235fa6e0 100644
--- a/tests/i915/gem_exec_gttfill.c
+++ b/tests/i915/gem_exec_gttfill.c
@@ -120,17 +120,16 @@ static void fillgtt(int fd, unsigned ring, int timeout)
igt_assert(shared != MAP_FAILED);
nengine = 0;
- if (ring == 0) {
- for_each_physical_engine(e, fd) {
- if (!gem_can_store_dword(fd, eb_ring(e)))
+ if (ring == ALL_ENGINES) {
+ struct intel_execution_engine2 *e;
+
+ __for_each_physical_engine(fd, e) {
+ if (!gem_class_can_store_dword(fd, e->class))
continue;
- engines[nengine++] = eb_ring(e);
+ engines[nengine++] = e->flags;
}
} else {
- gem_require_ring(fd, ring);
- igt_require(gem_can_store_dword(fd, ring));
-
engines[nengine++] = ring;
}
igt_require(nengine);
@@ -200,28 +199,33 @@ static void fillgtt(int fd, unsigned ring, int timeout)
igt_main
{
- const struct intel_execution_engine *e;
- int device = -1;
+ const struct intel_execution_engine2 *e;
+ int i915 = -1;
igt_fixture {
- device = drm_open_driver(DRIVER_INTEL);
- igt_require_gem(device);
- igt_require(gem_can_store_dword(device, 0));
- igt_fork_hang_detector(device);
+ i915 = drm_open_driver(DRIVER_INTEL);
+ igt_require_gem(i915);
+ igt_fork_hang_detector(i915);
}
- igt_subtest("basic")
- fillgtt(device, 0, 1); /* just enough to run a single pass */
+ igt_subtest("basic") /* just enough to run a single pass */
+ fillgtt(i915, ALL_ENGINES, 1);
+
+ igt_subtest_with_dynamic("engines") {
+ __for_each_physical_engine(i915, e) {
+ if (!gem_class_can_store_dword(i915, e->class))
+ continue;
- for (e = intel_execution_engines; e->name; e++)
- igt_subtest_f("%s", e->name)
- fillgtt(device, eb_ring(e), 20);
+ igt_dynamic_f("%s", e->name)
+ fillgtt(i915, e->flags, 20);
+ }
+ }
igt_subtest("all")
- fillgtt(device, 0, 150);
+ fillgtt(i915, ALL_ENGINES, 20);
igt_fixture {
igt_stop_hang_detector();
- close(device);
+ close(i915);
}
}
diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
index c819fee5..264f7648 100644
--- a/tests/intel-ci/blacklist.txt
+++ b/tests/intel-ci/blacklist.txt
@@ -28,7 +28,6 @@ igt@gem_exec_big@(?!.*single).*
igt@gem_exec_capture@many-(?!4K-).*
igt@gem_exec_fence@(?!.*basic).*
igt@gem_exec_flush@(?!.*basic).*
-igt@gem_exec_gttfill@(?!.*basic).*
igt@gem_exec_latency(@.*)?
igt@gem_exec_lut_handle(@.*)?
igt@gem_exec_nop@(?!.*basic).*