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 94975CD6E56 for ; Thu, 5 Sep 2024 16:45:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D50810E903; Thu, 5 Sep 2024 16:45:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="bhsniEq/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 737B210E8C8 for ; Thu, 5 Sep 2024 16:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725554705; x=1757090705; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=I+g3N4f451IsaSG3SKlZztijb9XA5mRmS1oUCGKRMhs=; b=bhsniEq/Mb9DTkm5opvGA2MVbTDmiJPV0yVYaSl8tLCUwnXQidZIqJkM y+7ecjnEOFXiQ+T9QxWU7aol25c1+K18BZigouseZlP4ieBiUPf8JzSif HYvaysW+GlJ9H/JRVgm0WGT9oqVQx6C7ZPmGi6ftbes11gm5mN3qEAfIO /MtgkGcVqogXg28x2KnNB1WQheC0GFtLSJ1STtJfv9s65WKQrWgNfUY8I snskSCS4KmVhx/ORmPkA3S/5iYWodhMLEp0m7eiavP67+O2m6eT54RGzg rb/yky3z+9OcHdyk6Mx0gmmY8L/MiuZ3jiqbaTHiy0fLsq+I1uUrpGaSo A==; X-CSE-ConnectionGUID: SRqGzWp5QIi7sFzWAHhFXg== X-CSE-MsgGUID: aawb+2rJSe+lY7jEUqgvMw== X-IronPort-AV: E=McAfee;i="6700,10204,11186"; a="41764583" X-IronPort-AV: E=Sophos;i="6.10,205,1719903600"; d="scan'208";a="41764583" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2024 09:45:05 -0700 X-CSE-ConnectionGUID: ZgPhzMnKS1y7lxBKUpMFMw== X-CSE-MsgGUID: Wc0LJUV5TlGphfDQyhyk1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,205,1719903600"; d="scan'208";a="70485540" Received: from orsosgc001.jf.intel.com ([10.165.21.138]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2024 09:45:05 -0700 From: Ashutosh Dixit To: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 3/4] xe/oa: Update scripts to support BMG Date: Thu, 5 Sep 2024 09:44:57 -0700 Message-ID: <20240905164458.2406145-3-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240905164458.2406145-1-ashutosh.dixit@intel.com> References: <20240905164458.2406145-1-ashutosh.dixit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" From: José Roberto de Souza v2: Retain LNL metrics as the default for Xe2+ (Ashutosh) Reviewed-by: Ashutosh Dixit Signed-off-by: Ashutosh Dixit Signed-off-by: José Roberto de Souza --- 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, 19 insertions(+), 1 deletion(-) 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 @@ + + + + + + + + + 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 1bc2eeb0a1..86264230c9 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, @@ -295,6 +296,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 (devinfo->is_lunarlake) { + intel_xe_perf_load_metrics_lnl(perf); + } else if (devinfo->is_battlemage) { + intel_xe_perf_load_metrics_bmg(perf); } else if (intel_graphics_ver(device_id) >= IP_VER(20, 0)) { intel_xe_perf_load_metrics_lnl(perf); } else { -- 2.41.0