[PATCH i-g-t 2/6] tests/intel/xe_oa: Fix oa_tick_delta
Ashutosh Dixit
ashutosh.dixit at intel.com
Tue Apr 8 18:12:06 UTC 2025
oa_tick_delta should take into account whether OA report header is 64 or 32
bit when passing width to elapsed_delta.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
tests/intel/xe_oa.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index a20120881a..2440101900 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -627,8 +627,11 @@ oa_tick_delta(const uint32_t *report1,
const uint32_t *report0,
enum intel_xe_oa_format_name format)
{
+ struct oa_format fmt = get_oa_format(format);
+ uint32_t width = fmt.report_hdr_64bit ? 64 : 32;
+
return elapsed_delta(read_report_ticks(report1, format),
- read_report_ticks(report0, format), 32);
+ read_report_ticks(report0, format), width);
}
static void
--
2.48.1
More information about the igt-dev
mailing list