Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Ashutosh Dixit" <ashutosh.dixit@intel.com>,
	"José Roberto de Souza" <jose.souza@intel.com>
Subject: [PATCH i-g-t v3 3/4] xe/oa: Update scripts to support BMG
Date: Tue,  3 Sep 2024 13:54:56 -0700	[thread overview]
Message-ID: <20240903205457.109320-3-jose.souza@intel.com> (raw)
In-Reply-To: <20240903205457.109320-1-jose.souza@intel.com>

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/meson.build                           | 1 +
 lib/xe/oa-configs/guids.xml               | 9 +++++++++
 lib/xe/oa-configs/mdapi-xml-convert.py    | 1 +
 lib/xe/oa-configs/oa-metricset-codegen.py | 2 +-
 lib/xe/oa-configs/oa_guid_registry.py     | 1 +
 lib/xe/oa-configs/update-guids.py         | 1 +
 lib/xe/xe_oa.c                            | 5 ++++-
 7 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/lib/meson.build b/lib/meson.build
index 4af2bc7432..1c83bc5c30 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -417,6 +417,7 @@ xe_oa_hardware = [
   'pvc',
   'mtlgt2', 'mtlgt3',
   'lnl',
+  'bmg',
 ]
 
 xe_xml_files = []
diff --git a/lib/xe/oa-configs/guids.xml b/lib/xe/oa-configs/guids.xml
index 27330edd3d..dd912d00f1 100644
--- a/lib/xe/oa-configs/guids.xml
+++ b/lib/xe/oa-configs/guids.xml
@@ -2760,4 +2760,13 @@
     <guid config_hash="d635631df97322be3d97b9c4e38152e9" mdapi_config_hash="68c19075e48e5128b456a91cd7b95286" id="914ad901-832a-4ccd-a21e-ddc7690ed213" chipset="lnl" name="MetricSet2" />
     <guid config_hash="d63d186f5b83e91f8c0680847bbf4b24" mdapi_config_hash="d31ec4eaa11c8be0d8d72ecece53434f" id="3b3c9f55-e34b-423d-8c05-7b1af03b6685" chipset="lnl" name="MetricSet3" />
     <guid config_hash="76b7587d047c30ecde26e3f6253b4165" mdapi_config_hash="e39d956ed7b8d0cbe7d354cff234af7d" id="e6f21065-a6f5-4ea4-a545-80d6aebaab56" chipset="lnl" name="MetricSet4" />
+    <guid config_hash="cb471dd20a7c853d00899dc7ef33aa0e" mdapi_config_hash="4583b70c638040debcfa88563635b0f5" id="f05e23fc-913d-4ab9-ba9a-43beb059a18c" chipset="bmg" name="RenderBasic" />
+    <guid config_hash="230eab6aa4f36b6de10357fe5f951d46" mdapi_config_hash="8eb3576953c1d98c1637128b495f8fa0" id="c7383a12-5c52-47a8-8e42-11b24d64d1f8" chipset="bmg" name="ComputeBasic" />
+    <guid config_hash="955739b43332e61729e0a7a032188c02" mdapi_config_hash="d9be0378dd2dd6a5f85f71d156d21b43" id="a80e9da5-d2c9-4c20-9f7c-c0adf74bbe89" chipset="bmg" name="DepthProfile" />
+    <guid config_hash="55ecb5067bca7d99769a30a14eaceba5" mdapi_config_hash="e444af605670c2230a5796b4ad65b2c0" id="d8bb1c75-31d8-41a1-99db-99d98be17e78" chipset="bmg" name="DeviceCacheProfile" />
+    <guid config_hash="3dfc710d13968f4398a46cdc3b6549db" mdapi_config_hash="b2c033ea452ef7f46322932fe5e0cfe6" id="d2e403f3-4c94-4b1b-bc09-f472a43251a4" chipset="bmg" name="MemoryProfile" />
+    <guid config_hash="5d38d137356ca80dca2ea337449675be" mdapi_config_hash="07f0aa1a93f77bc7b6771ba2b68c8325" id="dad0d2c6-1290-4d50-a6aa-8b8104204232" chipset="bmg" name="RenderPipeProfile" />
+    <guid config_hash="72e3ab9e7d727f97c5ea29bef23be40e" mdapi_config_hash="e6b78fe68f406ee2a0cc25293c60bc62" id="da09a8a6-802c-48bc-8f3a-35834c9b8ba2" chipset="bmg" name="RTProfile" />
+    <guid config_hash="6dc1bd4e8d8b49cc9776701db836ffe9" mdapi_config_hash="cee63b3642783febd3bcbf45629c5e1c" id="dfe5251f-af3e-434c-b627-38490f2213da" chipset="bmg" name="VectorEngineProfile" />
+    <guid config_hash="b87d3a3dfab7193309deb13aeb595589" mdapi_config_hash="1950d62ef4b729af4494d76ca3ec8101" id="d008dcae-2a82-4929-a94d-2ba1e9c569d6" chipset="bmg" name="VectorEngineStalls" />
 </guids>
diff --git a/lib/xe/oa-configs/mdapi-xml-convert.py b/lib/xe/oa-configs/mdapi-xml-convert.py
index 602a3965af..df6ab3f9cb 100755
--- a/lib/xe/oa-configs/mdapi-xml-convert.py
+++ b/lib/xe/oa-configs/mdapi-xml-convert.py
@@ -207,6 +207,7 @@ chipsets = {
     'ACM': xehpsdv_chipset_oa_formats,
     'MTL': mtl_chipset_oa_formats,
     'LNL': xe2_chipset_oa_formats,
+    'BMG': xe2_chipset_oa_formats,
 }
 
 xehp_plus = ( 'ACM', 'MTL' )
diff --git a/lib/xe/oa-configs/oa-metricset-codegen.py b/lib/xe/oa-configs/oa-metricset-codegen.py
index 5fa12f9caf..8816c0893f 100644
--- a/lib/xe/oa-configs/oa-metricset-codegen.py
+++ b/lib/xe/oa-configs/oa-metricset-codegen.py
@@ -138,7 +138,7 @@ 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":
+        elif gen.chipset == "lnl" or gen.chipset == "bmg":
             c(textwrap.dedent("""\
                 metric_set->perf_oa_format = XE_OA_FORMAT_PEC64u64;
 
diff --git a/lib/xe/oa-configs/oa_guid_registry.py b/lib/xe/oa-configs/oa_guid_registry.py
index 969d40e568..4b07faf59c 100644
--- a/lib/xe/oa-configs/oa_guid_registry.py
+++ b/lib/xe/oa-configs/oa_guid_registry.py
@@ -102,6 +102,7 @@ class Registry:
                            'PVC',
                            'MTL',
                            'LNL',
+                           'BMG',
                           )
         if name in known_chipsets:
             return name
diff --git a/lib/xe/oa-configs/update-guids.py b/lib/xe/oa-configs/update-guids.py
index 18f3458e84..5a099a1587 100755
--- a/lib/xe/oa-configs/update-guids.py
+++ b/lib/xe/oa-configs/update-guids.py
@@ -166,6 +166,7 @@ chipsets = [ 'hsw',
              'acmgt1', 'acmgt2', 'acmgt3',
              'mtlgt2', 'mtlgt3',
              'lnl',
+             'bmg',
 ]
 
 for chipset in chipsets:
diff --git a/lib/xe/xe_oa.c b/lib/xe/xe_oa.c
index 4764ed1fcf..a7df68488c 100644
--- a/lib/xe/xe_oa.c
+++ b/lib/xe/xe_oa.c
@@ -38,6 +38,7 @@
 #include "xe_oa_metrics_mtlgt3.h"
 #include "xe_oa_metrics_pvc.h"
 #include "xe_oa_metrics_lnl.h"
+#include "xe_oa_metrics_bmg.h"
 
 static struct intel_xe_perf_logical_counter_group *
 intel_xe_perf_logical_counter_group_new(struct intel_xe_perf *perf,
@@ -300,8 +301,10 @@ intel_xe_perf_for_devinfo(uint32_t device_id,
 	} else if (devinfo->is_pontevecchio) {
 		perf->devinfo.eu_threads_count = 8;
 		intel_xe_perf_load_metrics_pvc(perf);
-	} else if (intel_graphics_ver(device_id) >= IP_VER(20, 0)) {
+	} else if (devinfo->is_lunarlake) {
 		intel_xe_perf_load_metrics_lnl(perf);
+	} else if (devinfo->is_battlemage) {
+		intel_xe_perf_load_metrics_bmg(perf);
 	} else {
 		return unsupported_xe_oa_platform(perf);
 	}
-- 
2.46.0


  parent reply	other threads:[~2024-09-03 20:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 20:54 [PATCH i-g-t v3 1/4] tests/xe_oa: Drop TestOa from metric_set() José Roberto de Souza
2024-09-03 20:54 ` [PATCH i-g-t v3 2/4] xe/oa: Update oa-lnl.xml José Roberto de Souza
2024-09-03 20:54 ` José Roberto de Souza [this message]
2024-09-05 16:36   ` [PATCH i-g-t v3 3/4] xe/oa: Update scripts to support BMG Dixit, Ashutosh
2024-09-03 20:54 ` [PATCH i-g-t v3 4/4] xe/oa: Add oa-bmg.xml José Roberto de Souza
2024-09-03 22:03 ` ✓ CI.xeBAT: success for series starting with [i-g-t,v3,1/4] tests/xe_oa: Drop TestOa from metric_set() Patchwork
2024-09-03 22:27 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-04  1:44 ` ✗ CI.xeFULL: " Patchwork
2024-09-05 23:41 ` ✓ CI.xeBAT: success for series starting with [i-g-t,v3,1/4] tests/xe_oa: Drop TestOa from metric_set() (rev2) Patchwork
2024-09-06  0:12 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-08  4:24 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-10  0:35 ` ✗ 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=20240903205457.109320-3-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=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