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 C1B24C30658 for ; Fri, 28 Jun 2024 22:24:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F32D610E31C; Fri, 28 Jun 2024 22:24:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="c1rkAYEl"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by gabe.freedesktop.org (Postfix) with ESMTPS id 292CF10E31F for ; Fri, 28 Jun 2024 22:24: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=1719613444; x=1751149444; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=F7RS27jfrb8unqnFpL9oG7FN1jIfUpL5ngJ4P3b+0so=; b=c1rkAYElC15FYHeVSNG3GKc+lajzBkFkjt8EScGhV+7JD+xY+gEmeehe TGgYtkrxdp5aHdiZh8psTdBfOCjC+a83gJF+zfHZxXglM9O/o57VyF/Bl X+0CeaQ9bk7kEHht7Cbdk0vKGI4aqo/Cx21JNhPvdJiUh1iuYULul9pck Yn+FDriMNJlAKVZfG/1KYz+YgES3bF/mVJwFD9HFv8nvmr9z/ZP7vXXML J7Z/gxUPQyCqwSxAmQPz7nWgD02waClinK1nkC72ttpyc7W+i+oF1WGC7 8GBV+B/LkmI8uFCJAeAPFeYQ/P6jiPBAFWyWeI/bG4U+bohhCom1xDoXt g==; X-CSE-ConnectionGUID: D3nN7ie0RHSwzZQ7D0Zzdw== X-CSE-MsgGUID: C46HNVPARC+0Cre0MsKRow== X-IronPort-AV: E=McAfee;i="6700,10204,11117"; a="42232681" X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="42232681" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 15:24:03 -0700 X-CSE-ConnectionGUID: VrWnH8f7TXq2PAksx2C4aA== X-CSE-MsgGUID: sFML4qFOSk6jFac6VNcsaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,170,1716274800"; d="scan'208";a="45616191" Received: from orsosgc001.jf.intel.com ([10.165.21.138]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2024 15:24:03 -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 15:23:45 -0700 Message-ID: <20240628222358.2151036-4-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240628222358.2151036-1-ashutosh.dixit@intel.com> References: <20240628222358.2151036-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