diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-18 11:54:27 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-18 17:03:31 +0300 |
commit | 226b9995d1fb486d34cd35428025b55532e9e3d1 (patch) | |
tree | 1b698d55cc0833a3603a20be134602283b01b7f7 /tests/perf_pmu.c | |
parent | 2df2ad21f8df58cbfb2be671571d9d9bae54e96c (diff) |
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 <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r-- | tests/perf_pmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index 4f552bc2..28f235b1 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -189,10 +189,10 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin) igt_nsec_elapsed(&start); - if (spin->running) { + if (igt_spin_has_poll(spin)) { unsigned long timeout = 0; - while (!READ_ONCE(*spin->running)) { + while (!igt_spin_has_started(spin)) { unsigned long t = igt_nsec_elapsed(&start); if ((t - timeout) > 250e6) { |