diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-23 17:15:58 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-04-24 10:55:43 +0300 |
commit | 5e7519121de3c0e97ec27d33d6164278e86e75c5 (patch) | |
tree | fd1296da4b1d4db235be3f92958e408245769ce5 /tests/perf_pmu.c | |
parent | 504367d33b787de2ba8e007a5b620cfd6f0b3074 (diff) |
lib/igt_dummyload: Introduce igt_spin_reset
Libify resetting a spin for reuse.
v2: use also in perf_pmu
v3: s/cmd_spin/cmd_precondition
v4: remove early return for !spin (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
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 | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index a8ad86ce..e719a292 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -1501,14 +1501,6 @@ test_enable_race(int gem_fd, const struct intel_execution_engine2 *e) gem_quiescent_gpu(gem_fd); } -static void __rearm_spin(igt_spin_t *spin) -{ - const uint32_t mi_arb_chk = 0x5 << 23; - - *spin->batch = mi_arb_chk; - __sync_synchronize(); -} - #define __assert_within(x, ref, tol_up, tol_down) \ igt_assert_f((double)(x) <= ((double)(ref) + (tol_up)) && \ (double)(x) >= ((double)(ref) - (tol_down)), \ @@ -1596,7 +1588,7 @@ accuracy(int gem_fd, const struct intel_execution_engine2 *e, nanosleep(&_ts, NULL); /* Restart the spinbatch. */ - __rearm_spin(spin); + igt_spin_reset(spin); __submit_spin(gem_fd, spin, e, 0); /* PWM busy sleep. */ |