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 67898C3065B for ; Fri, 28 Jun 2024 20:43:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C801110E234; Fri, 28 Jun 2024 20:43:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QHrP6lEp"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91CB810E0A8 for ; Fri, 28 Jun 2024 20:43:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1719607434; x=1751143434; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=F7RS27jfrb8unqnFpL9oG7FN1jIfUpL5ngJ4P3b+0so=; b=QHrP6lEpraz28MtK1fYWEy6KsUeA2USB+h0I3CKBy8LCKuYZNoBASCeb oxHagMRcyDf3XoJpRp3/mqUjShLyYv2Lb1BbuR44myWO4mydKNjx8sswb +Qq/0fXNfXGBZtG6hhMnzaFnit4oU9Ye3C0Rta52NhY39GE7xXWYO2Hfx ZAhrpTTzOjf9fL5GENYxAMovXBl/EemgQJAV/33oCg2gHObJOeieiw9EI ezyQmDTPl72LsL53a4Aj0TvXUfzGTHwyvokeM4N2PFCoxdGDu5WnOsJ0i qehB4zRvO6ie7U5d+2KHo0h3lTJ4TkMrv0xY9NDCc3MNurSD3C+H17OM0 w==; X-CSE-ConnectionGUID: yYw7ns7ZS4aHJWdtcDlHZg== X-CSE-MsgGUID: DJOE3kDdRPq3zuh6X8q9KA== X-IronPort-AV: E=McAfee;i="6700,10204,11117"; a="27427480" X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="27427480" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 13:43:54 -0700 X-CSE-ConnectionGUID: gqkiKKG6Ru2OK/UN7cYfLw== X-CSE-MsgGUID: ejvyTwnxRN2t8wZEe/mQ6A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="49465192" Received: from orsosgc001.jf.intel.com ([10.165.21.138]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 13:43:53 -0700 From: Ashutosh Dixit To: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 03/16] lib/xe/oa: Add OA LNL metrics (oa_lnl.xml) Date: Fri, 28 Jun 2024 13:43:35 -0700 Message-ID: <20240628204348.2142940-4-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240628204348.2142940-1-ashutosh.dixit@intel.com> References: <20240628204348.2142940-1-ashutosh.dixit@intel.com> MIME-Version: 1.0 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" $ mdapi-xml-convert.py --guids=guids.xml MetricsXML_P31.xml > oa-lnl.xml Note: The metrics XML's consist of (a) the registers (in this case NOA or mux registers) to be programmed (b) the metrics themselves which specify how the counters in the reports should be combined to construct the metrics. The changes in mdapi-xml-convert.py in this patch completely ignore (b) since they are not relevant for IGT. (a) is needed for IGT LNL OAG uses "576B_PEC64LL" format which is not available on previous platforms so we cannot use metrics for a previous platform such as MTL to generate LNL OAG data. Note: LNL media guids had issues after running mdapi-convert-xml.py so have not been added, revisit this. Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa --- lib/xe/oa-configs/mdapi-xml-convert.py | 25 + lib/xe/oa-configs/oa-lnl.xml | 2799 ++++++++++++++++++++++++ 2 files changed, 2824 insertions(+) create mode 100644 lib/xe/oa-configs/oa-lnl.xml diff --git a/lib/xe/oa-configs/mdapi-xml-convert.py b/lib/xe/oa-configs/mdapi-xml-convert.py index 5903ef4d35..ab4747ddd1 100755 --- a/lib/xe/oa-configs/mdapi-xml-convert.py +++ b/lib/xe/oa-configs/mdapi-xml-convert.py @@ -149,6 +149,21 @@ mtl_chipset_oam_samedia_params = { } } +# FIXME: everything except oa_report_size is incorrect here +xe2_chipset_params = { + 'a_offset': 16, + 'b_offset': 192, + 'c_offset': 224, + 'oa_report_size': 576, + 'config_reg_blacklist': { + 0x2364, # OACTXID + }, + 'register_offsets': { + 0x1b0: 'PERFCNT 0', + 0x1b8: 'PERFCNT 1', + } +} + hsw_chipset_oa_formats = { '256B_GENERIC_NOA16': hsw_chipset_params, } @@ -167,6 +182,10 @@ mtl_chipset_oa_formats = { '128B_MPEC8_NOA16': mtl_chipset_oam_samedia_params, } +xe2_chipset_oa_formats = { + '256B_GENERIC_NOA16': xe2_chipset_params, +} + chipsets = { 'HSW': hsw_chipset_oa_formats, 'BDW': gen8_11_chipset_oa_formats, @@ -185,10 +204,13 @@ chipsets = { 'ADL': gen8_11_chipset_oa_formats, 'ACM': xehpsdv_chipset_oa_formats, 'MTL': mtl_chipset_oa_formats, + 'LNL': xe2_chipset_oa_formats, } xehp_plus = ( 'ACM', 'MTL' ) +xe2_plus = ( 'LNL' ) + register_types = { 'OA', 'NOA', 'FLEX', 'PM' } default_set_blacklist = { "RenderDX1x", # TODO: rename to something non 'DX' @@ -352,6 +374,9 @@ def read_token_to_rpn_read_oag(chipset, token, raw_offsets, oa_format): return "C " + str(idx - 48) + " READ" else: return "{0} READ".format(read_value(chipset, offset, oa_format)) + elif chipset in xe2_plus: + # FIXME: skip all metrics to retain just the registers + return "GPU_TIME 0 READ" else: # For Gen8+ the array of accumulated counters is # assumed to start with a GPU_TIME then GPU_CLOCK, diff --git a/lib/xe/oa-configs/oa-lnl.xml b/lib/xe/oa-configs/oa-lnl.xml new file mode 100644 index 0000000000..3576ca2827 --- /dev/null +++ b/lib/xe/oa-configs/oa-lnl.xml @@ -0,0 +1,2799 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.41.0