[PATCH i-g-t] i915/perf_pmu: Measure how many batches can fit into the ring

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

 



Do not blindly assume 30 spin batches will always fit into the ring, but
use our measurement tool instead.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 tests/perf_pmu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index de4c231dd..8e50ac9a0 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -42,6 +42,7 @@
 #include "igt_perf.h"
 #include "igt_sysfs.h"
 #include "igt_pm.h"
+#include "i915/gem_ring.h"
 #include "sw_sync.h"
 
 IGT_TEST_DESCRIPTION("Test the i915 pmu perf interface");
@@ -1276,8 +1277,9 @@ static void cpu_hotplug(int gem_fd)
 static void
 test_interrupts(int gem_fd)
 {
+	const int target =
+		gem_measure_ring_inflight(gem_fd, I915_EXEC_DEFAULT, 0);
 	const unsigned int test_duration_ms = 1000;
-	const int target = 30;
 	igt_spin_t *spin[target];
 	struct pollfd pfd;
 	uint64_t idle, busy;
-- 
2.24.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