[igt-dev] [RFC v2 36/43] tests/i915/i915_hangman: use the gem_engine_topology library

Ramalingam C
2019-06-21T10:02:06Z

tests/i915/i915_hangman.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
index 58141fc928f0..047d7d5f5d04 100644
--- a/tests/i915/i915_hangman.c
+++ b/tests/i915/i915_hangman.c
@@ -199,7 +199,7 @@ static void check_error_state(const char *expected_ring_name,
igt_assert(found);
}

-static void test_error_state_capture(unsigned ring_id,
+static void test_error_state_capture(const struct intel_execution_engine2 *e,
const char *ring_name)
{
uint32_t *batch;
@@ -208,7 +208,7 @@ static void test_error_state_capture(unsigned ring_id,

clear_error_state();

- hang = igt_hang_ctx(device, 0, ring_id, HANG_ALLOW_CAPTURE);
+ hang = igt_hang_ctx(device, 0, e->flags, HANG_ALLOW_CAPTURE);
offset = hang.spin->obj[IGT_SPIN_BATCH].offset;

batch = gem_mmap__cpu(device, hang.spin->handle, 0, 4096, PROT_READ);
@@ -278,7 +278,7 @@ igt_main

__for_each_physical_engine(device, e)
igt_subtest_f("error-state-capture-%s", e->name)
- test_error_state_capture(e->flags, e->name);
+ test_error_state_capture(e, e->name);

igt_subtest("hangcheck-unterminated")
hangcheck_unterminated();