From 226b9995d1fb486d34cd35428025b55532e9e3d1 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Thu, 18 Apr 2019 11:54:27 +0300 Subject: lib/igt_dummyload: libify checks for spin batch activation Instead of opencoding the poll into the spinner, use a helper to check if spinner has started. v2: use zero as presumed offset (Chris) v3: cleanup the relocs (Chris) v4: leave the domains to zero, avoid relocation (Chris) Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson --- tests/i915/gem_ctx_exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/i915/gem_ctx_exec.c') diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c index d67d0ec2..f37e6f28 100644 --- a/tests/i915/gem_ctx_exec.c +++ b/tests/i915/gem_ctx_exec.c @@ -181,10 +181,8 @@ static void norecovery(int i915) spin = __igt_spin_batch_new(i915, .ctx = param.ctx_id, .flags = IGT_SPIN_POLL_RUN); - igt_assert(spin->running); + igt_spin_busywait_until_started(spin); - while (!READ_ONCE(*spin->running)) - ; igt_force_gpu_reset(i915); igt_spin_batch_end(spin); -- cgit v1.2.3