From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8735410E2DF for ; Tue, 25 Oct 2022 20:07:19 +0000 (UTC) From: Umesh Nerlige Ramappa To: igt-dev@lists.freedesktop.org Date: Tue, 25 Oct 2022 20:07:09 +0000 Message-Id: <20221025200709.83314-30-umesh.nerlige.ramappa@intel.com> In-Reply-To: <20221025200709.83314-1-umesh.nerlige.ramappa@intel.com> References: <20221025200709.83314-1-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH 29/29] lib/i915/perf: configure OA timestamp shift and mask for ACM List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Lionel Landwerlin 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 Reviewed-by: Umesh Nerlige Ramappa --- 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