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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux