[igt-dev] [PATCH i-g-t v2 28/28] lib/i915/perf: configure OA timestamp shift and mask for ACM

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Thu Oct 27 20:55:35 UTC 2022


From: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

OA reports have the timestamp value shifted to the right by 1 bits, it
also means we cannot use the top bit for comparison. Configure OA
timestamp shift and mask for ACM.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
---
 lib/i915/perf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/i915/perf.c b/lib/i915/perf.c
index fa291998..28f37948 100644
--- a/lib/i915/perf.c
+++ b/lib/i915/perf.c
@@ -377,6 +377,12 @@ intel_perf_for_devinfo(uint32_t device_id,
 		intel_perf_load_metrics_adl(perf);
 	} else if (devinfo->is_dg2) {
 		perf->devinfo.eu_threads_count = 8;
+		/* OA reports have the timestamp value shifted to the
+		 * right by 1 bits, it also means we cannot use the
+		 * top bit for comparison.
+		 */
+		perf->devinfo.oa_timestamp_shift = -1;
+		perf->devinfo.oa_timestamp_mask = 0x7fffffff;
 
 		if (is_acm_gt1(&perf->devinfo))
 			intel_perf_load_metrics_acmgt1(perf);
-- 
2.25.1



More information about the igt-dev mailing list