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_eio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/i915/gem_eio.c') diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index 29250852..07bbdeb1 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -186,8 +186,8 @@ static igt_spin_t * __spin_poll(int fd, uint32_t ctx, unsigned long flags) static void __spin_wait(int fd, igt_spin_t *spin) { - if (spin->running) { - igt_spin_busywait_until_running(spin); + if (igt_spin_has_poll(spin)) { + igt_spin_busywait_until_started(spin); } else { igt_debug("__spin_wait - usleep mode\n"); usleep(500e3); /* Better than nothing! */ -- cgit v1.2.3