[PATCH igt 2/3] igt/perf_pmu: Test for supported perf before starting test_interrupts

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

 



Check for the perf event prior to calibrating the nop batch, so that we
don't spend 4.5s before skipping.

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

diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 420eb6c9..dd7a1761 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -898,11 +898,11 @@ test_interrupts(int gem_fd)
 	unsigned int i;
 	int fd;
 
+	fd = open_pmu(I915_PMU_INTERRUPTS);
+
 	cal = calibrate_nop(gem_fd, calibration_us);
 	sz = batch_len_us * cal / calibration_us;
 
-	fd = open_pmu(I915_PMU_INTERRUPTS);
-
 	gem_quiescent_gpu(gem_fd);
 
 	/* Wait for idle state. */
-- 
2.15.0

_______________________________________________
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