From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 913E910E7A5 for ; Tue, 20 Sep 2022 20:03:08 +0000 (UTC) Date: Tue, 20 Sep 2022 13:02:54 -0700 From: Umesh Nerlige Ramappa To: Message-ID: References: <20220823183036.5270-1-umesh.nerlige.ramappa@intel.com> <20220823183036.5270-21-umesh.nerlige.ramappa@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Disposition: inline In-Reply-To: <20220823183036.5270-21-umesh.nerlige.ramappa@intel.com> MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t 20/23] lib/i915/perf: implement report accumulation for new format List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Tue, Aug 23, 2022 at 06:30:33PM +0000, Umesh Nerlige Ramappa wrote: >From: Lionel Landwerlin > >Available on XEHPSDV+. > >Signed-off-by: Lionel Landwerlin Reviewed-by: Umesh Nerlige Ramappa Thanks, Umesh >--- > lib/i915/perf.c | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > >diff --git a/lib/i915/perf.c b/lib/i915/perf.c >index 2f24cbd8..d004313f 100644 >--- a/lib/i915/perf.c >+++ b/lib/i915/perf.c >@@ -676,6 +676,39 @@ void intel_perf_accumulate_reports(struct intel_perf_accumulator *acc, > memset(acc, 0, sizeof(*acc)); > > switch (oa_format) { >+ case I915_OA_FORMAT_A24u40_A14u32_B8_C8: >+ accumulate_uint32(start + 1, end + 1, deltas + idx++); /* timestamp */ >+ accumulate_uint32(start + 3, end + 3, deltas + idx++); /* clock */ >+ >+ /* 4x 32bit A0-3 counters... */ >+ for (i = 0; i < 4; i++) >+ accumulate_uint32(start + 4 + i, end + 4 + i, deltas + idx++); >+ >+ /* 20x 40bit A4-23 counters... */ >+ for (i = 0; i < 20; i++) >+ accumulate_uint40(i + 4, start, end, deltas + idx++); >+ >+ /* 4x 32bit A24-27 counters... */ >+ for (i = 0; i < 4; i++) >+ accumulate_uint32(start + 28 + i, end + 28 + i, deltas + idx++); >+ >+ /* 4x 40bit A28-31 counters... */ >+ for (i = 0; i < 4; i++) >+ accumulate_uint40(i + 28, start, end, deltas + idx++); >+ >+ /* 5x 32bit A32-36 counters... */ >+ for (i = 0; i < 5; i++) >+ accumulate_uint32(start + 36 + i, end + 36 + i, deltas + idx++); >+ >+ /* 1x 32bit A37 counter... */ >+ accumulate_uint32(start + 46, end + 46, deltas + idx++); >+ >+ /* 8x 32bit B counters + 8x 32bit C counters... */ >+ for (i = 0; i < 16; i++) >+ accumulate_uint32(start + 48 + i, end + 48 + i, deltas + idx++); >+ break; >+ >+ case I915_OAR_FORMAT_A32u40_A4u32_B8_C8: > case I915_OA_FORMAT_A32u40_A4u32_B8_C8: > accumulate_uint32(start + 1, end + 1, deltas + idx++); /* timestamp */ > accumulate_uint32(start + 3, end + 3, deltas + idx++); /* clock */ >-- >2.25.1 >