summaryrefslogtreecommitdiff
path: root/tests/drv_hangman.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-02-21 14:13:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2018-02-23 16:42:36 +0000
commit305ebcedc36e98f3118ac27a5bbde0ce7cd71a74 (patch)
tree3e392be546ac6e667b13ad6b494d724ab4822707 /tests/drv_hangman.c
parentf9b6fd624be9692e9a892c0976fa72cedefc9fed (diff)
Iterate over physical engines
We current have a single for_each_engine() iterator which we use to generate both a set of uABI engines and a set of physical engines. Determining what uABI ring-id corresponds to an actual HW engine is tricky, so pull that out to a library function and introduce for_each_physical_engine() for cases where we want to issue requests once on each HW ring (avoiding aliasing issues). v2: Remember can_store_dword for gem_sync v3: Find more open-coded for_each_physical Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/drv_hangman.c')
-rw-r--r--tests/drv_hangman.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index 40c82257..38cb20c3 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -183,8 +183,6 @@ static void test_error_state_capture(unsigned ring_id,
igt_hang_t hang;
uint64_t offset;
- igt_require(gem_has_ring(device, ring_id));
-
clear_error_state();
hang = igt_hang_ctx(device, 0, ring_id, HANG_ALLOW_CAPTURE, &offset);
@@ -255,23 +253,11 @@ igt_main
if (e->exec_id == 0)
continue;
- /*
- * If the device has 2 BSD rings then due to obtuse aliasing
- * in the API, we can not determine which ring I915_EXEC_BSD
- * will map to, and so must skip the test; as the matching name
- * may be either bsd or bsd2 depending on the kernel/test
- * ordering.
- *
- * Here we are not checking that executing on every ABI engine
- * results in a detectable hang, but that a hang generated
- * from a specific HW engine gives an indentifiable result.
- */
- if (e->exec_id == I915_EXEC_BSD && e->flags == 0)
- continue;
-
- igt_subtest_f("error-state-capture-%s", e->name)
+ igt_subtest_f("error-state-capture-%s", e->name) {
+ igt_require(gem_ring_has_physical_engine(device, e->exec_id | e->flags));
test_error_state_capture(e->exec_id | e->flags,
e->full_name);
+ }
}
igt_subtest("hangcheck-unterminated")