[Intel-gfx] [PATCH i-g-t 2/2] igt/perf_pmu: Fast slow then meander

Chris Wilson chris at chris-wilson.co.uk
Wed Jun 20 11:57:06 UTC 2018


Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/perf_pmu.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 4570f926d..a2e20b8fc 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -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)
-- 
2.18.0.rc2



More information about the Intel-gfx mailing list