@@ -206,11 +206,15 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)
static igt_spin_t * __spin_sync(int fd, uint32_t ctx, unsigned long flags)
{
- igt_spin_t *spin = __spin_poll(fd, ctx, flags);
+ igt_spin_t *spin[2];
+
+ spin[0] = __spin_poll(fd, ctx, flags);
+ spin[1] = __igt_spin_batch_new(fd, ctx, flags, 0);
- __spin_wait(fd, spin);
+ __spin_wait(fd, spin[0]);
+ igt_spin_batch_free(fd, spin[0]);
- return spin;
+ return spin[1];
}
static igt_spin_t * spin_sync(int fd, uint32_t ctx, unsigned long flags)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- tests/perf_pmu.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)