summaryrefslogtreecommitdiff
path: root/tests/perf_pmu.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-11-22 18:03:11 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-11-23 07:25:49 +0000
commite2d8057598e78d466167b9a89c18e63324a8cc1f (patch)
tree2903aed8825c058500463afc857f43a906a72cbc /tests/perf_pmu.c
parentdb31e3c1ca0953b6e6832c25060acd01012a66dd (diff)
igt/perf_pmu: Test for supported perf before starting test_interrupts
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@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r--tests/perf_pmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index 8585ed7b..f4de3ec7 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -880,11 +880,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. */