From: John Harrison <john.c.harri...@intel.com>

The capture test was still using old style ring_id and ring_name
(derived from the engine structure at the higher level). Update it to
just take the engine structure directly.

Signed-off-by: John Harrison <john.c.harri...@intel.com>
Reviewed-by: Matthew Brost <matthew.br...@intel.com>
---
 tests/i915/i915_hangman.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c
index f64b8819d..280eac197 100644
--- a/tests/i915/i915_hangman.c
+++ b/tests/i915/i915_hangman.c
@@ -207,8 +207,8 @@ static void check_error_state(const char 
*expected_ring_name,
        igt_assert(found);
 }
 
-static void test_error_state_capture(const intel_ctx_t *ctx, unsigned ring_id,
-                                    const char *ring_name)
+static void test_error_state_capture(const intel_ctx_t *ctx,
+                                    const struct intel_execution_engine2 *e)
 {
        uint32_t *batch;
        igt_hang_t hang;
@@ -217,7 +217,7 @@ static void test_error_state_capture(const intel_ctx_t 
*ctx, unsigned ring_id,
 
        clear_error_state();
 
-       hang = igt_hang_ctx_with_ahnd(device, ahnd, ctx->id, ring_id,
+       hang = igt_hang_ctx_with_ahnd(device, ahnd, ctx->id, e->flags,
                                      HANG_ALLOW_CAPTURE);
        offset = hang.spin->obj[IGT_SPIN_BATCH].offset;
 
@@ -226,7 +226,7 @@ static void test_error_state_capture(const intel_ctx_t 
*ctx, unsigned ring_id,
 
        igt_post_hang_ring(device, hang);
 
-       check_error_state(ring_name, offset, batch);
+       check_error_state(e->name, offset, batch);
        munmap(batch, 4096);
        put_ahnd(ahnd);
 }
@@ -351,7 +351,7 @@ igt_main
        igt_subtest_with_dynamic("error-state-capture") {
                for_each_ctx_engine(device, ctx, e) {
                        igt_dynamic_f("%s", e->name)
-                               test_error_state_capture(ctx, e->flags, 
e->name);
+                               test_error_state_capture(ctx, e);
                }
        }
 
-- 
2.25.1

Reply via email to