[igt-dev] [PATCH i-g-t] tests/perf: adapt report timing delta acceptance for ICL

Lionel Landwerlin lionel.g.landwerlin at intel.com
Wed Oct 10 17:49:12 UTC 2018


The behavior of the OA unit is a tiny bit different on ICL. It appears
to be a bit sloppier on the timings of its OA reports (missing the
deadline by one period quite often). Let's add an acceptance delta.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 tests/perf.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index 6a6001d5..a92de221 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -1674,6 +1674,16 @@ static void load_helper_fini(void)
 		drm_intel_bufmgr_destroy(lh.bufmgr);
 }
 
+static bool expected_report_timing_delta(uint32_t delta, uint32_t expected_delta)
+{
+	/*
+	 * On ICL, the OA unit appears to be a bit more relaxed about
+	 * its timing for emitting OA reports (often missing the
+	 * deadline by 1 timestamp).
+	 */
+	return delta <= (expected_delta + 3);
+}
+
 static void
 test_oa_exponents(void)
 {
@@ -1774,9 +1784,9 @@ test_oa_exponents(void)
 			igt_debug("report%04i ts=%08x hw_id=0x%08x delta=%u %s\n", i,
 				  timer_reports[i].report[1],
 				  oa_report_get_ctx_id(timer_reports[i].report),
-				  delta, delta == expected_timestamp_delta ? "" : "******");
+				  delta, expected_report_timing_delta(delta,expected_timestamp_delta) ? "" : "******");
 
-			matches += expected_timestamp_delta <= delta;
+			matches += expected_report_timing_delta(delta,expected_timestamp_delta);
 		}
 
 		igt_debug("matches=%u/%u\n", matches, n_timer_reports - 1);
-- 
2.19.1



More information about the igt-dev mailing list