Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t 05/27] lib/xe/oa: Generate LNL metrics/registers files
Date: Fri,  7 Jun 2024 13:08:25 -0700	[thread overview]
Message-ID: <20240607200847.1964629-6-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20240607200847.1964629-1-ashutosh.dixit@intel.com>

Generate metrics/registers .c and .h files with the XE_OA_FORMAT_PEC64u64
format (called 576B_PEC64LL) used in MetricsXML_P31.xml.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/xe/oa-configs/oa-metricset-codegen.py | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/lib/xe/oa-configs/oa-metricset-codegen.py b/lib/xe/oa-configs/oa-metricset-codegen.py
index be9483af02..ea0d13cc97 100644
--- a/lib/xe/oa-configs/oa-metricset-codegen.py
+++ b/lib/xe/oa-configs/oa-metricset-codegen.py
@@ -116,7 +116,7 @@ def generate_metric_sets(args, gen):
         if gen.chipset.startswith("acm") or gen.chipset.startswith("mtl"):
             if set.oa_format == "128B_MPEC8_NOA16":
                 c(textwrap.dedent("""\
-                    metric_set->perf_oa_format = I915_OAM_FORMAT_MPEC8u32_B8_C8;
+                    metric_set->perf_oa_format = XE_OAM_FORMAT_MPEC8u32_B8_C8;
 
                     metric_set->perf_raw_size = 128;
                     metric_set->gpu_time_offset = 0;
@@ -128,7 +128,7 @@ def generate_metric_sets(args, gen):
                 """))
             else:
                 c(textwrap.dedent("""\
-                    metric_set->perf_oa_format = I915_OA_FORMAT_A24u40_A14u32_B8_C8;
+                    metric_set->perf_oa_format = XE_OA_FORMAT_A24u40_A14u32_B8_C8;
 
                     metric_set->perf_raw_size = 256;
                     metric_set->gpu_time_offset = 0;
@@ -138,9 +138,22 @@ def generate_metric_sets(args, gen):
                     metric_set->c_offset = metric_set->b_offset + 8;
                     metric_set->perfcnt_offset = metric_set->c_offset + 8;
                 """))
+        elif gen.chipset == "lnl":
+            c(textwrap.dedent("""\
+                metric_set->perf_oa_format = XE_OA_FORMAT_PEC64u64;
+
+                metric_set->perf_raw_size = 576;
+                metric_set->gpu_time_offset = 0;
+                metric_set->gpu_clock_offset = 1;
+                metric_set->a_offset = 2;
+                // metric_set->b_offset = metric_set->a_offset + 38;
+                // metric_set->c_offset = metric_set->b_offset + 8;
+                metric_set->perfcnt_offset = metric_set->a_offset + 64;
+
+            """))
         else:
             c(textwrap.dedent("""\
-                metric_set->perf_oa_format = I915_OA_FORMAT_A32u40_A4u32_B8_C8;
+                metric_set->perf_oa_format = XE_OA_FORMAT_A32u40_A4u32_B8_C8;
 
                 metric_set->perf_raw_size = 256;
                 metric_set->gpu_time_offset = 0;
-- 
2.41.0


  parent reply	other threads:[~2024-06-07 20:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 20:08 [PATCH i-g-t v3 00/27] Intel Xe OA IGT's Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 01/27] lib/xe/oa: Import OA metric generation files from i915 Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 02/27] lib/xe/oa: Add LNL metric guids Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 03/27] lib/xe/oa: Add OA LNL metrics (oa_lnl.xml) Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 04/27] lib/xe/oa: Add truncated legacy Xe1 metrics XML's Ashutosh Dixit
2024-06-07 20:08 ` Ashutosh Dixit [this message]
2024-06-07 20:08 ` [PATCH i-g-t 06/27] lib/xe/oa: Switch generated files to Xe namespace Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 07/27] drm-uapi/xe: Sync with Perf/OA changes Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 08/27] lib/xe: Complete xe_oa lib functionality Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 09/27] tests/intel/xe_query: Add OA units query test Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 10/27] tests/intel/xe_oa: Add first tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 11/27] tests/intel/xe_oa: Add some negative tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 12/27] tests/intel/xe_oa: Add "oa-formats" subtest Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 13/27] tests/intel/xe_oa: Add oa exponent tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 14/27] tests/intel/xe_oa: buffer-fill, non-zero-reason, enable-disable Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 15/27] tests/intel/xe_oa: blocking and polling tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 16/27] tests/intel/xe_oa: OAR/OAC tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 17/27] tests/intel/xe_oa: Exclusive/concurrent access, rc6 and stress open close Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 18/27] tests/intel/xe_oa: add remove OA config tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 19/27] tests/intel/xe_oa: OA buffer mmap tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 20/27] tests/intel/xe_oa: Register whitelisting and MMIO trigger tests Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 21/27] lib/xe/oa: Add xe_oa_data_reader to IGT lib Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 22/27] tools/xe-perf: Add xe_perf_recorder Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 23/27] tools/xe-perf: xe_perf_reader, xe_perf_control and xe_perf_configs Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 24/27] xe/oa: Fix invalid escape warnings Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 25/27] xe/oa/mdapi-xml-convert: Add support for 576B_PEC64LL format Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 26/27] xe/oa: Regenerate oa-lnl.xml now parsing all counters Ashutosh Dixit
2024-06-07 20:08 ` [PATCH i-g-t 27/27] xe/oa/oa-metricset-codegen: Fix XE_OA_FORMAT_PEC64u64 offsets Ashutosh Dixit
2024-06-07 22:48 ` ✗ GitLab.Pipeline: warning for Intel Xe OA IGT's (rev3) Patchwork
2024-06-07 23:22 ` ✓ Fi.CI.BAT: success " Patchwork
2024-06-07 23:23 ` ✗ CI.xeBAT: failure " Patchwork
2024-06-08 14:10 ` ✗ CI.xeFULL: " Patchwork
2024-06-08 15:04 ` ✗ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240607200847.1964629-6-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox