[PATCH i-g-t] i915/perf_pmu: Check on the health of the spinner while waiting

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

 



And give up if we never even make it to the start.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111592
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 tests/perf_pmu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index d392a67d4..8a06e5d44 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -191,10 +191,12 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)
 		while (!igt_spin_has_started(spin)) {
 			unsigned long t = igt_nsec_elapsed(&start);
 
+			igt_assert(gem_bo_busy(fd, spin->handle));
 			if ((t - timeout) > 250e6) {
 				timeout = t;
 				igt_warn("Spinner not running after %.2fms\n",
 					 (double)t / 1e6);
+				igt_assert(t < 2e9);
 			}
 		}
 	} else {
@@ -202,6 +204,7 @@ static unsigned long __spin_wait(int fd, igt_spin_t *spin)
 		usleep(500e3); /* Better than nothing! */
 	}
 
+	igt_assert(gem_bo_busy(fd, spin->handle));
 	return igt_nsec_elapsed(&start);
 }
 
-- 
2.23.0

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




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

  Powered by Linux