[PATCH 1/2] xe/oa: Update scripts to support PTL
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Jun 10 20:22:03 UTC 2025
On Wed, 04 Jun 2025 14:50:42 -0700, Sushma Venkatesh Reddy wrote:
>
Hi Sushma,
> Signed-off-by: Sushma Venkatesh Reddy <sushma.venkatesh.reddy at intel.com>
> ---
> lib/meson.build | 1 +
> lib/xe/oa-configs/guids.xml | 14 ++++++++++++++
> lib/xe/oa-configs/mdapi-xml-convert.py | 19 +++++++++++++++++++
> 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 +
> 6 files changed, 37 insertions(+), 1 deletion(-)
I made a few minor changes and pushed a new version here:
https://patchwork.freedesktop.org/series/150062/
The diff betweeen your version and my version is as follows. Could you
please take a look. If it's ok, we can move towards merging this.
I have some comments below the diff too about the changes I made, but
mostly it is the same as what is mentioned in the version log in the patches.
diff --git a/lib/xe/oa-configs/guids.xml b/lib/xe/oa-configs/guids.xml
index b9487c81b1..a7ca3e00f0 100644
--- a/lib/xe/oa-configs/guids.xml
+++ b/lib/xe/oa-configs/guids.xml
@@ -2770,7 +2770,6 @@
<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" />
<guid config_hash="6723e2305bfd92e1d94c4242e476ee36" mdapi_config_hash="8c21cff2375af4159f5abd0ef05ee97a" id="9ec392a7-4c77-4253-a28a-85240821e82c" chipset="bmg" name="TestOa" />
- <guid mdapi_config_hash="3c2ee9a97141f36bc13828aeda30e477" id="b13bebeb-15c6-440c-9168-51ba2ad0e14a" chipset="ptl" name="PipelineStats" />
<guid config_hash="208c3c79f1b4db2f86277292566d3f10" mdapi_config_hash="1fbaf5ad061ccf96ff7d4e108cbcf3ae" id="a78beb3a-98d1-48cc-86ee-29bb3cc3b5a7" chipset="ptl" name="RenderBasic" />
<guid config_hash="39eb89a5a9a33ab05bce6069f77e0cbb" mdapi_config_hash="24837cfd6478062c78968430d5f8a902" id="751a8e91-f8cd-49ba-95ef-28f45fd4ded6" chipset="ptl" name="ComputeBasic" />
<guid config_hash="955739b43332e61729e0a7a032188c02" mdapi_config_hash="d9be0378dd2dd6a5f85f71d156d21b43" id="b7f6cc1f-8092-44c2-8889-82ca13aa736a" chipset="ptl" name="DepthProfile" />
@@ -2781,7 +2780,4 @@
<guid config_hash="6dc1bd4e8d8b49cc9776701db836ffe9" mdapi_config_hash="cee63b3642783febd3bcbf45629c5e1c" id="765ea760-ca86-475a-a807-7c75f44b39c9" chipset="ptl" name="VectorEngineProfile" />
<guid config_hash="b87d3a3dfab7193309deb13aeb595589" mdapi_config_hash="1950d62ef4b729af4494d76ca3ec8101" id="64c274c2-3df8-44c7-a779-085e27d474d3" chipset="ptl" name="VectorEngineStalls" />
<guid config_hash="2c8d8862e0eab0c587f2a2c18d96ad3b" mdapi_config_hash="89ebddf1d2af3b8acb33e7e3488086be" id="cf90eca9-c696-4e2c-8f48-0574b1745a58" chipset="ptl" name="TestOa" />
- <guid config_hash="8558ae483770cbd2b2647fac43742d3d" mdapi_config_hash="7d87d4e394083695910c216ae9dce526" id="e8d82001-29be-4dc3-96f4-aa569d27635c" chipset="ptl" name="MediaSet1" />
- <guid mdapi_config_hash="883c847bdfecb4051eb3fde4009cf4ec" id="d5b211bb-8651-4c92-9bc9-3b5a6881a13b" chipset="ptl" name="MediaSet2" />
- <guid mdapi_config_hash="3c2ee9a97141f36bc13828aeda30e477" id="5f744d66-6840-479d-8626-65919115f241" chipset="ptl" name="EuStallSampling" />
</guids>
diff --git a/lib/xe/oa-configs/mdapi-xml-convert.py b/lib/xe/oa-configs/mdapi-xml-convert.py
index f1a7c4f37b..9abc7e5292 100755
--- a/lib/xe/oa-configs/mdapi-xml-convert.py
+++ b/lib/xe/oa-configs/mdapi-xml-convert.py
@@ -162,19 +162,6 @@ xe2_chipset_params_pec = {
}
}
-xe3_chipset_params_pec = {
- 'pec_offset': 32,
- 'oa_report_size': 576,
- # TODO: Not sure about the configs below
- 'config_reg_blacklist': {
- 0x2364, # OACTXID
- },
- 'register_offsets': {
- 0x1b0: 'PERFCNT 0',
- 0x1b8: 'PERFCNT 1',
- }
-}
-
hsw_chipset_oa_formats = {
'256B_GENERIC_NOA16': hsw_chipset_params,
}
@@ -201,11 +188,6 @@ xe2_chipset_oa_formats = {
'128B_MPEC8_NOA16': mtl_chipset_oam_samedia_params,
}
-xe3_chipset_oa_formats = {
- '576B_PEC64LL': xe3_chipset_params_pec,
- '256B_GENERIC_NOA16': xehpsdv_chipset_params,
-}
-
chipsets = {
'HSW': hsw_chipset_oa_formats,
'BDW': gen8_11_chipset_oa_formats,
@@ -226,7 +208,7 @@ chipsets = {
'MTL': mtl_chipset_oa_formats,
'LNL': xe2_chipset_oa_formats,
'BMG': xe2_chipset_oa_formats,
- 'PTL': xe3_chipset_oa_formats,
+ 'PTL': xe2_chipset_oa_formats,
}
xehp_plus = ( 'ACM', 'MTL' )
diff --git a/lib/xe/xe_oa.c b/lib/xe/xe_oa.c
index db614b7322..428e7d0a29 100644
--- a/lib/xe/xe_oa.c
+++ b/lib/xe/xe_oa.c
@@ -39,6 +39,7 @@
#include "xe_oa_metrics_pvc.h"
#include "xe_oa_metrics_lnl.h"
#include "xe_oa_metrics_bmg.h"
+#include "xe_oa_metrics_ptl.h"
static struct intel_xe_perf_logical_counter_group *
intel_xe_perf_logical_counter_group_new(struct intel_xe_perf *perf,
@@ -300,6 +301,8 @@ intel_xe_perf_for_devinfo(uint32_t device_id,
intel_xe_perf_load_metrics_lnl(perf);
} else if (devinfo->is_battlemage) {
intel_xe_perf_load_metrics_bmg(perf);
+ } else if (devinfo->is_pantherlake) {
+ intel_xe_perf_load_metrics_ptl(perf);
} else if (intel_graphics_ver(device_id) >= IP_VER(20, 0)) {
intel_xe_perf_load_metrics_lnl(perf);
} else {
>
> diff --git a/lib/meson.build b/lib/meson.build
> index f54198051..161edf04f 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -437,6 +437,7 @@ xe_oa_hardware = [
> 'mtlgt2', 'mtlgt3',
> 'lnl',
> 'bmg',
> + 'ptl',
> ]
>
> xe_xml_files = []
> diff --git a/lib/xe/oa-configs/guids.xml b/lib/xe/oa-configs/guids.xml
> index c8831a912..b9487c81b 100644
> --- a/lib/xe/oa-configs/guids.xml
> +++ b/lib/xe/oa-configs/guids.xml
> @@ -2770,4 +2770,18 @@
> <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" />
> <guid config_hash="6723e2305bfd92e1d94c4242e476ee36" mdapi_config_hash="8c21cff2375af4159f5abd0ef05ee97a" id="9ec392a7-4c77-4253-a28a-85240821e82c" chipset="bmg" name="TestOa" />
> + <guid mdapi_config_hash="3c2ee9a97141f36bc13828aeda30e477" id="b13bebeb-15c6-440c-9168-51ba2ad0e14a" chipset="ptl" name="PipelineStats" />
> + <guid config_hash="208c3c79f1b4db2f86277292566d3f10" mdapi_config_hash="1fbaf5ad061ccf96ff7d4e108cbcf3ae" id="a78beb3a-98d1-48cc-86ee-29bb3cc3b5a7" chipset="ptl" name="RenderBasic" />
> + <guid config_hash="39eb89a5a9a33ab05bce6069f77e0cbb" mdapi_config_hash="24837cfd6478062c78968430d5f8a902" id="751a8e91-f8cd-49ba-95ef-28f45fd4ded6" chipset="ptl" name="ComputeBasic" />
> + <guid config_hash="955739b43332e61729e0a7a032188c02" mdapi_config_hash="d9be0378dd2dd6a5f85f71d156d21b43" id="b7f6cc1f-8092-44c2-8889-82ca13aa736a" chipset="ptl" name="DepthProfile" />
> + <guid config_hash="55ecb5067bca7d99769a30a14eaceba5" mdapi_config_hash="e444af605670c2230a5796b4ad65b2c0" id="89acd6f6-6559-4aae-8178-e3d475c2af4e" chipset="ptl" name="DeviceCacheProfile" />
> + <guid config_hash="073c22bb18e4ea3a39b43ab9cf9915a1" mdapi_config_hash="b29927048361ca3c24e3228e5f77cc25" id="9a4e83b3-2f9b-4d09-a9b7-256b7e7ad536" chipset="ptl" name="MemoryProfile" />
> + <guid config_hash="5d38d137356ca80dca2ea337449675be" mdapi_config_hash="07f0aa1a93f77bc7b6771ba2b68c8325" id="37a30f4d-40b1-4ad5-aeab-592c72e22536" chipset="ptl" name="RenderPipeProfile" />
> + <guid config_hash="85bd9123cd9231c85b4cde11e6a17a68" mdapi_config_hash="72bda7af5deee4193c5ef93165851069" id="7d46ea13-6f8c-4b7f-8ecd-a14839b2c2e3" chipset="ptl" name="RTProfile" />
> + <guid config_hash="6dc1bd4e8d8b49cc9776701db836ffe9" mdapi_config_hash="cee63b3642783febd3bcbf45629c5e1c" id="765ea760-ca86-475a-a807-7c75f44b39c9" chipset="ptl" name="VectorEngineProfile" />
> + <guid config_hash="b87d3a3dfab7193309deb13aeb595589" mdapi_config_hash="1950d62ef4b729af4494d76ca3ec8101" id="64c274c2-3df8-44c7-a779-085e27d474d3" chipset="ptl" name="VectorEngineStalls" />
> + <guid config_hash="2c8d8862e0eab0c587f2a2c18d96ad3b" mdapi_config_hash="89ebddf1d2af3b8acb33e7e3488086be" id="cf90eca9-c696-4e2c-8f48-0574b1745a58" chipset="ptl" name="TestOa" />
> + <guid config_hash="8558ae483770cbd2b2647fac43742d3d" mdapi_config_hash="7d87d4e394083695910c216ae9dce526" id="e8d82001-29be-4dc3-96f4-aa569d27635c" chipset="ptl" name="MediaSet1" />
> + <guid mdapi_config_hash="883c847bdfecb4051eb3fde4009cf4ec" id="d5b211bb-8651-4c92-9bc9-3b5a6881a13b" chipset="ptl" name="MediaSet2" />
> + <guid mdapi_config_hash="3c2ee9a97141f36bc13828aeda30e477" id="5f744d66-6840-479d-8626-65919115f241" chipset="ptl" name="EuStallSampling" />
I got rid of stuff here which was crashing or which didn't generate
anything in oa-ptl.xml.
Otherwise yes I also could not get rid of mdapi_config_hash stuff, I just
deleted those lines.
> </guids>
> diff --git a/lib/xe/oa-configs/mdapi-xml-convert.py b/lib/xe/oa-configs/mdapi-xml-convert.py
> index df6ab3f9c..f1a7c4f37 100755
> --- a/lib/xe/oa-configs/mdapi-xml-convert.py
> +++ b/lib/xe/oa-configs/mdapi-xml-convert.py
> @@ -162,6 +162,19 @@ xe2_chipset_params_pec = {
> }
> }
>
> +xe3_chipset_params_pec = {
> + 'pec_offset': 32,
> + 'oa_report_size': 576,
> + # TODO: Not sure about the configs below
> + 'config_reg_blacklist': {
> + 0x2364, # OACTXID
> + },
> + 'register_offsets': {
> + 0x1b0: 'PERFCNT 0',
> + 0x1b8: 'PERFCNT 1',
> + }
> +}
Got rid of this.
> +
> hsw_chipset_oa_formats = {
> '256B_GENERIC_NOA16': hsw_chipset_params,
> }
> @@ -188,6 +201,11 @@ xe2_chipset_oa_formats = {
> '128B_MPEC8_NOA16': mtl_chipset_oam_samedia_params,
> }
>
> +xe3_chipset_oa_formats = {
> + '576B_PEC64LL': xe3_chipset_params_pec,
> + '256B_GENERIC_NOA16': xehpsdv_chipset_params,
> +}
> +
Got rid of this.
> chipsets = {
> 'HSW': hsw_chipset_oa_formats,
> 'BDW': gen8_11_chipset_oa_formats,
> @@ -208,6 +226,7 @@ chipsets = {
> 'MTL': mtl_chipset_oa_formats,
> 'LNL': xe2_chipset_oa_formats,
> 'BMG': xe2_chipset_oa_formats,
> + 'PTL': xe3_chipset_oa_formats,
Just using xe2_chipset_oa_formats here, xe3 can use xe2 stuff.
Thanks.
--
Ashutosh
> }
>
> 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 8816c0893..748f58787 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" or gen.chipset == "bmg":
> + elif gen.chipset == "lnl" or gen.chipset == "bmg" or gen.chipset == "ptl":
> 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 4b07faf59..55c496816 100644
> --- a/lib/xe/oa-configs/oa_guid_registry.py
> +++ b/lib/xe/oa-configs/oa_guid_registry.py
> @@ -103,6 +103,7 @@ class Registry:
> 'MTL',
> 'LNL',
> 'BMG',
> + 'PTL',
> )
> 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 5a099a158..c3f5a37c6 100755
> --- a/lib/xe/oa-configs/update-guids.py
> +++ b/lib/xe/oa-configs/update-guids.py
> @@ -167,6 +167,7 @@ chipsets = [ 'hsw',
> 'mtlgt2', 'mtlgt3',
> 'lnl',
> 'bmg',
> + 'ptl',
> ]
>
> for chipset in chipsets:
> --
> 2.43.0
>
More information about the igt-dev
mailing list