[PATCH i-g-t 4/6] tests/intel/xe_oa: Only sanity check timer PEC reports

Ashutosh Dixit ashutosh.dixit at intel.com
Tue Apr 8 18:12:08 UTC 2025


Empirical testing revealed that when reports of different types/reasons are
intermixed, this throws off gpu_ticks and test_event1_cycles_xecore* in PEC
data, causing test failures. To avoid this, restrict testing to only
timer/periodic reports.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 tests/intel/xe_oa.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index eaf97ae0df..cc9702322d 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -1031,6 +1031,19 @@ static void pec_sanity_check_two(const u32 *report0, const u32 *report1,
 	u64 *pec0 = (u64 *)(report0 + 8);
 	u64 *pec1 = (u64 *)(report1 + 8);
 
+	/*
+	 * Empirical testing revealed that when reports of different types/reasons are
+	 * intermixed, this throws off gpu_ticks and test_event1_cycles_xecore* in PEC
+	 * data, causing test failures. To avoid this, restrict testing to only
+	 * timer/periodic reports.
+	 */
+	if (strcmp(read_report_reason(report0), "timer") ||
+	    strcmp(read_report_reason(report1), "timer")) {
+		igt_debug("Only checking timer reports: %s->%s\n",
+		  read_report_reason(report0), read_report_reason(report1));
+		return;
+	}
+
 	igt_debug("tick delta = %#lx\n", tick_delta);
 
 	/* Difference in test_event1_cycles_xecore* values should be close to tick_delta */
-- 
2.48.1



More information about the igt-dev mailing list