@@ -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);
}
}