Skip to content
Snippets Groups Projects
Commit e6b07d1b authored by John Harrison's avatar John Harrison Committed by Ashutosh Dixit
Browse files

tests/i915/i915_hangman: Update capture test to use engine structure


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: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
parent 35b5acfe
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment