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 59EF7C41513 for ; Fri, 7 Jun 2024 20:09:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B59B710ED05; Fri, 7 Jun 2024 20:09:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="M5rYJm5x"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AC8E10ED05 for ; Fri, 7 Jun 2024 20:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717790939; x=1749326939; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=59v2fPbRjmMNFfApwQVkSYOgIW6Xaee1b8WLsUOmysY=; b=M5rYJm5xCZAg4YTQ5f6FyQX/ac61OdivFTj/qZbdQI6KemWJlq6bRgvB I9JeH1e2jRLZ6WSMDo7p3avbwpTdYHm0dJvGkN0qeKQLCaESfYRqDUgUx w4IsoBsR571I1gkJp+DwrhWK3ww3Ner4g7xokB4Rpq5iQSvza3+QqxE6d v329EIhWzO7ntVE1WZ4UzTJElSsGU2IDhqLQQs+Rs7ufwzkr8u4c49hxu fASlRXi8zYk25bvqNa1vOJ5Rp742R4oQPuKGe/qaWTspnOMy8ABydMY9w SRYn5fVeosTfLlasNR9RUD2zdG9WtFmvdWf5f5NY2B+ZJiwOJPXWvJ0zj A==; X-CSE-ConnectionGUID: xhtIy0TTTmG9EFAiFrur7w== X-CSE-MsgGUID: Sj8+ROOCQIWc3UaUpkbPjA== X-IronPort-AV: E=McAfee;i="6600,9927,11096"; a="18383214" X-IronPort-AV: E=Sophos;i="6.08,221,1712646000"; d="scan'208";a="18383214" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 13:08:58 -0700 X-CSE-ConnectionGUID: DvsHCoB2T8+BCjMTTB71ew== X-CSE-MsgGUID: i7IQ3YizRKWe5EkgPTkZzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,221,1712646000"; d="scan'208";a="38373831" Received: from orsosgc001.jf.intel.com ([10.165.21.138]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2024 13:08:58 -0700 From: Ashutosh Dixit To: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 03/27] lib/xe/oa: Add OA LNL metrics (oa_lnl.xml) Date: Fri, 7 Jun 2024 13:08:23 -0700 Message-ID: <20240607200847.1964629-4-ashutosh.dixit@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240607200847.1964629-1-ashutosh.dixit@intel.com> References: <20240607200847.1964629-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 --- 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