From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C37710E043 for ; Wed, 22 Mar 2023 05:43:51 +0000 (UTC) Date: Tue, 21 Mar 2023 22:43:47 -0700 Message-ID: <874jqduyr0.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa In-Reply-To: <20230322000523.3310187-32-umesh.nerlige.ramappa@intel.com> References: <20230322000523.3310187-1-umesh.nerlige.ramappa@intel.com> <20230322000523.3310187-32-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t v4 31/31] lib/i915/perf: Apply shift to raw timestamp as well List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, Lionel G Landwerlin Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Tue, 21 Mar 2023 17:05:23 -0700, Umesh Nerlige Ramappa wrote: > > Apply the OA timestamp shift to the raw timestamp as well. Reviewed-by: Ashutosh Dixit > Signed-off-by: Umesh Nerlige Ramappa > --- > lib/i915/perf.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/i915/perf.c b/lib/i915/perf.c > index d736490b..ddadb53b 100644 > --- a/lib/i915/perf.c > +++ b/lib/i915/perf.c > @@ -1003,6 +1003,11 @@ uint64_t intel_perf_read_record_timestamp_raw(const struct intel_perf *perf, > assert(0); > } > > + if (perf->devinfo.oa_timestamp_shift >= 0) > + ts <<= perf->devinfo.oa_timestamp_shift; > + else > + ts >>= -perf->devinfo.oa_timestamp_shift; > + > return ts; > } > > -- > 2.36.1 >