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 0F2F8C982DA for ; Fri, 18 Sep 2026 13:18:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B5B1610F371; Fri, 18 Sep 2026 13:18:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="IoeEb81y"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58C2910F384 for ; Fri, 18 Sep 2026 13:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1789737487; x=1821273487; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=GceCAcaaGJiGFn3WNl1vRm2/Wk+8/41/q/onpNyS8nQ=; b=IoeEb81yQaHp74TsFklD4/QMyyjiMkfIfBGSzhs56FjzZe0cO4i3HxhF bF6hB5Rsdqghcvf633R43VUoRVHWPgpgzAR9hvapVwdfP/UME0MsKrbU3 v3d1J0O8TDblG01z5tct62WXZw/qnJ2CS7Osk3Pb6VLYm2eqBH1KA4k5X fZgWkzrqfB1jkDnwDF6aI/h3bi+nzkr9WEuwmaJUsscmOsjAqOucZCJWr kFsqGpouGLzM0grZrP4MCJfD2yxkbm3RmkS1E8/Fcr7DdxyN25tDbLIG1 u0ZA9y2+C0z+J2Ou4x+YBgKjs4e/juzJ/x2uMCXb8GHxinquo+rewB/8k A==; X-CSE-ConnectionGUID: TDb8HgGuRJGob/LxY4ZrLg== X-CSE-MsgGUID: 072U6IhMTa6D4hQMyEaC9Q== X-IronPort-AV: E=McAfee;i="6800,10657,11908"; a="89378300" X-IronPort-AV: E=Sophos;i="6.27,109,1787036400"; d="scan'208";a="89378300" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2026 06:18:03 -0700 X-CSE-ConnectionGUID: RsfRBwfvTl6At85wCmvAOg== X-CSE-MsgGUID: TneM0WMfSxKQNsTkw5ByTQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,109,1787036400"; d="scan'208";a="270095369" Received: from mjruhl-vm.amr.corp.intel.com ([10.11.186.166]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2026 06:18:03 -0700 From: "Michael J. Ruhl" To: platform-driver-x86@vger.kernel.org, intel-xe@lists.freedesktop.org, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, 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, karthik.poosa@intel.com Subject: [PATCH v10 20/20] drm/xe/vsec: Refactor platform check Date: Fri, 18 Sep 2026 06:18:11 -0700 Message-ID: <20260918131751.2408883-42-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260918131751.2408883-22-michael.j.ruhl@intel.com> References: <20260918131751.2408883-22-michael.j.ruhl@intel.com> 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" 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 c56f0e4a9b90..d90fa2dc6231 100644 --- a/drivers/gpu/drm/xe/xe_debugfs.c +++ b/drivers/gpu/drm/xe/xe_debugfs.c @@ -761,23 +761,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