summaryrefslogtreecommitdiff
path: root/tests/perf.c
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-10-10 10:44:14 -0700
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>2018-10-15 11:10:52 +0100
commit9bf0e5c75f27824df65b2c71d1a82980cf43c2dd (patch)
tree8f413446b5cf5dc8ac69c7140220fc5205f877b6 /tests/perf.c
parent93871c6fb3c25e5d350c9faf36ded917174214de (diff)
tests/perf: adapt report timing delta acceptance for ICL
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. v2: Use larger acceptance delta only on ICL (José) Tweak indentation (José) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'tests/perf.c')
-rw-r--r--tests/perf.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/perf.c b/tests/perf.c
index 16c1adb0..4f09aef7 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -1674,6 +1674,19 @@ 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).
+ */
+ if (IS_ICELAKE(devid))
+ return delta <= (expected_delta + 3);
+ else
+ return delta <= expected_delta;
+}
+
static void
test_oa_exponents(void)
{
@@ -1774,9 +1787,10 @@ 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);