From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09E39606A339 for ; Mon, 16 Nov 2026 15:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Uv0K+j9m Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B8F1110EA0E; Mon, 16 Nov 2026 15:07:47 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28F3289D60 for ; Mon, 16 Nov 2026 15:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794841650; x=1826377650; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=QiYfFgYYZQcBBNpVArn5SD00p+d28A1mpaJi2KCilyk=; b=Uv0K+j9m8HeK8fel+oN6GzqZV/MpKBnzv8We+yXU/0noqQHn1pSmzVOq EVskD7jMeMzQRBvDS13VF4smbB6vKKjndC5skPCQkw+lMx8PXrUqwI1qk dwAd3wFEXIt3EY7isjJt+/7YOEwu1QhmfS63yFKwdIosP7HwQZjPxdXta tKsJM8L3vNuRlKablmh0IMSR+nAJlSvYkaT+Dat2C+LNNnIxm2Ma8oGX8 bm07+2X6vpwfyrBmFkVxLdPtn8eUj9YpvAiZqKn9S8IJw8vJbPU9AVlv5 OT4FJB+1mhuiVznLA6aJZ0KjLvrCmYs9GPifgxzBFdXUNtIVihO4Mohsa g==; X-CSE-ConnectionGUID: QdcCDVoHQCKDmK6jBYi3Bw== X-CSE-MsgGUID: k6xIslPgSV+PzyDiOfGlbw== X-IronPort-AV: E=McAfee;i="6800,10657,11968"; a="3611855" X-IronPort-AV: E=Sophos;i="6.27,216,1787036400"; d="scan'208";a="3611855" Received: from fmviesa011.fm.intel.com ([10.60.135.151]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2026 07:07:01 -0800 X-CSE-ConnectionGUID: eH0AwxTSQ4Cj9IK/oa0NYg== X-CSE-MsgGUID: 3ZZthMOwTsqjxsAyd3OlCw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,216,1787036400"; d="scan'208";a="11359449" Received: from mjruhl-vm.amr.corp.intel.com ([10.11.186.166]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2026 07:07:02 -0800 From: "Michael J. Ruhl" To: intel-xe@lists.freedesktop.org, matthew.brost@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com, airlied@gmail.com, simona@ffwll.ch, david.e.box@linux.intel.com, anoop.c.vijay@intel.com, badal.nilawar@intel.com, matthew.d.roper@intel.com, james.ausmus@intel.com Subject: [PATCH v16 16/17] drm/xe/vsec: Refactor platform check Date: Mon, 16 Nov 2026 07:07:05 -0800 Message-ID: <20261116150649.368686-35-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261116150649.368686-19-michael.j.ruhl@intel.com> References: <20261116150649.368686-19-michael.j.ruhl@intel.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 For debugfs, residencies and pcode_info are available on the BMG and CRI (!SRIOV_VF) platforms. Refactor to have one code path for adding the debugfs entries. Reviewed-by: Karthik Poosa Signed-off-by: Michael J. Ruhl --- drivers/gpu/drm/xe/xe_debugfs.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c index b56e4aad4069..5a82f8eab2c6 100644 --- a/drivers/gpu/drm/xe/xe_debugfs.c +++ b/drivers/gpu/drm/xe/xe_debugfs.c @@ -702,23 +702,22 @@ void xe_debugfs_register(struct xe_device *xe) ARRAY_SIZE(debugfs_list), root, minor); - if (xe->info.platform == XE_BATTLEMAGE && !IS_SRIOV_VF(xe)) { - drm_debugfs_create_files(debugfs_residencies, - ARRAY_SIZE(debugfs_residencies), - root, minor); - } - /* - * Pcode version read from PMT is currently only supported on CRI and BMG platforms in PF - * mode, as both platforms support the necessary telemetry read mechanism and have a fixed - * PUNIT_VERSION_OFFSET. + * Residencies and Pcode version read from PMT is currently only supported on CRI and BMG + * platforms in PF mode. Both platforms support the necessary telemetry read mechanism + * and have a fixed offsets for the required data. * Attempting this access on other platforms must be verified before enabling support. */ if (!IS_SRIOV_VF(xe) && - (xe->info.platform == XE_CRESCENTISLAND || xe->info.platform == XE_BATTLEMAGE)) + (xe->info.platform == XE_CRESCENTISLAND || xe->info.platform == XE_BATTLEMAGE)) { + drm_debugfs_create_files(debugfs_residencies, + ARRAY_SIZE(debugfs_residencies), + root, minor); + drm_debugfs_create_files(pcode_info_debugfs, ARRAY_SIZE(pcode_info_debugfs), root, minor); + } debugfs_create_file("forcewake_all", 0400, root, xe, &forcewake_all_fops); -- 2.43.0