From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40E19C677C4 for ; Tue, 10 Jun 2025 20:22:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8F7810E2EE; Tue, 10 Jun 2025 20:22:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YzDLaaNv"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0757710E2EE for ; Tue, 10 Jun 2025 20:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749586924; x=1781122924; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=wyunxlkweVwJ/9HGb35wrPBq3BjcUiUlWX+4tbMQt/Y=; b=YzDLaaNv0h6eoPY7uGfGngDeWjuSyFrTJUCiS2/KFg+ZgpRG+8TfYj8a uxMrUxY67KBonRAsNHdOL24TWSKbfAJHRtWCgYwraGKOPAKYQxm+gn6/7 q0F5KZHx88KVQtHWAT+LbknhvxyweA3N/6i4tRPzGEiNxT4W9mu8yVZnx iWLVvOIArItkvxdYNTNatf+MyEUDgcoqkmvtnzRqQl+/0+TZ4IwmZotNc uOGT+d4jFA/9UeAzXlafRLDn/hEQp+8L5eSUSuic1a9XFDnD1b9kZubR3 yDsBca+hGepDUHakirorWqXaYGpbK7eWwLgKHxQMzW2iD/PIZtVICcGUS A==; X-CSE-ConnectionGUID: Trir6JNjT9Wou4cOFYUohg== X-CSE-MsgGUID: 7QqOtWTeQi2D//xQ19q5sw== X-IronPort-AV: E=McAfee;i="6800,10657,11460"; a="74253540" X-IronPort-AV: E=Sophos;i="6.16,225,1744095600"; d="scan'208";a="74253540" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2025 13:22:04 -0700 X-CSE-ConnectionGUID: /I/TE1ctSFKvw5O2RVhYOQ== X-CSE-MsgGUID: dMHtwhCNRgeTwmi9zJXF8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,225,1744095600"; d="scan'208";a="146850979" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.142]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2025 13:22:04 -0700 Date: Tue, 10 Jun 2025 13:22:03 -0700 Message-ID: <854iwnl53o.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Sushma Venkatesh Reddy Cc: igt-dev@lists.freedesktop.org Subject: Re: [PATCH 1/2] xe/oa: Update scripts to support PTL In-Reply-To: <20250604215043.6568-1-sushma.venkatesh.reddy@intel.com> References: <20250604215043.6568-1-sushma.venkatesh.reddy@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (x86_64-redhat-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" On Wed, 04 Jun 2025 14:50:42 -0700, Sushma Venkatesh Reddy wrote: > Hi Sushma, > Signed-off-by: Sushma Venkatesh Reddy > --- > 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 @@ - @@ -2781,7 +2780,4 @@ - - - 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 @@ > > > > + > + > + > + > + > + > + > + > + > + > + > + > + > + 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. > > 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 >