From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D77D851123F for ; Thu, 3 Sep 2026 20:11:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788466295; cv=none; b=Tn11OX8usGfLowb7+E189F+v9Ov6avb/k6T4rbSvWmKN61qJSkuhgV9wvx/mhcIHWEl0QxZORNAR7st5n2PxeYUxx2L2Nouj3+KuGU9ZtQzUVuvTviO3/Bg6UNfpcmgJnPNpNfRnuBl6OKqtDnNsD5EEwppokOl5U1stAtez/sY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788466295; c=relaxed/simple; bh=tQU1jdmfc0PmUxmEtaCKeRTvfkLR7BSYEbMuUrlD+lc=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KMnN6dMBRkjdzIQLbd1ayGUYbwKG/z6ovvMEOenEOFJYxLx20uEipLuJAOExEd86q5cnel5iQKHiQdtop0Lbdm89UIU1GK+xUup6+UMnDKwA/QA3lFT34e6l1UITRGU6C6N8fv/3r+xspc0AQRbnpwb8WSsT/e1ttQoZQ8l4KzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RQMFqpre; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RQMFqpre" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788466286; x=1820002286; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=tQU1jdmfc0PmUxmEtaCKeRTvfkLR7BSYEbMuUrlD+lc=; b=RQMFqpreTaN9T/yRGzoY793gWokrXVXf90tvKUgB6qoXAbncbfBht4F7 wPx6sJsZTUpxPs44mJ46otILmsOvP1FfNdYvZN4eu3ZHmdX03M/qWIV3G uPM8d6BhIheHdnt1oxRSLObTVddJeuEFsyCFprc6aacWcmZG809sQO1LI XI5CukNgZKoPUhqocWa3fIQiraW5ueMCLWKbqNs7pQkHVI9GAyJZ6T0gZ 9cIrRmRCMCmUDszAzVvDi+aU2CqXaXa1SfTxVRK+A6hhljyURaZzZXagG mrzXNaB0kngIP49D7NpaZbOplqqR9X5SREumrNtppyfjdvJApnEVUznNx g==; X-CSE-ConnectionGUID: UKyxxnsgSCOhiHw+mP7mZg== X-CSE-MsgGUID: EhG0Ya+lRi64EcGli4XJ1w== X-IronPort-AV: E=McAfee;i="6800,10657,11895"; a="88994661" X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="88994661" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 13:10:41 -0700 X-CSE-ConnectionGUID: fwhGSUjkThuaLu5u5kwMoQ== X-CSE-MsgGUID: 65MFJXY4QkaF1NkJuImpbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,260,1779174000"; d="scan'208";a="273348164" Received: from mjruhl-vm.amr.corp.intel.com ([10.11.186.166]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2026 13:10:38 -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 v5 18/18] drm/xe/vsec: Refactor platform check Date: Thu, 3 Sep 2026 13:10:20 -0700 Message-ID: <20260903201002.1064889-38-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260903201002.1064889-20-michael.j.ruhl@intel.com> References: <20260903201002.1064889-20-michael.j.ruhl@intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 f17b993755f3..9e32a5e230b9 100644 --- a/drivers/gpu/drm/xe/xe_debugfs.c +++ b/drivers/gpu/drm/xe/xe_debugfs.c @@ -712,23 +712,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