summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKarthik Poosa <karthik.poosa@intel.com>2026-07-02 14:55:40 +0530
committerMatt Roper <matthew.d.roper@intel.com>2026-07-06 08:55:48 -0700
commit0f800465ecabac95c434a98681124382bcec6207 (patch)
tree5f58e115ffcd95ece9bfa011d8c2083e28ac995f /drivers
parentf7c05238ab72ae72b5f6bd5516b02e7a24fdfd0d (diff)
downloadlinux-next-0f800465ecabac95c434a98681124382bcec6207.tar.gz
linux-next-0f800465ecabac95c434a98681124382bcec6207.zip
drm/xe/debugfs: Add debugfs for pcode information
Introduce a pcode_info debugfs entry to report pcode details. This initial implementation exposes the pcode version. This can aid debugging when the pcode version is needed. Signed-off-by: Karthik Poosa <karthik.poosa@intel.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Link: https://patch.msgid.link/20260702092540.1005095-3-karthik.poosa@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/xe/xe_debugfs.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
index 3c018dbccc07..8c391c7b017a 100644
--- a/drivers/gpu/drm/xe/xe_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_debugfs.c
@@ -21,6 +21,7 @@
#include "xe_guc_ads.h"
#include "xe_hw_engine.h"
#include "xe_mmio.h"
+#include "xe_pcode.h"
#include "xe_pm.h"
#include "xe_psmi.h"
#include "xe_pxp_debugfs.h"
@@ -160,6 +161,22 @@ static int workaround_info(struct seq_file *m, void *data)
return 0;
}
+static int pcode_info(struct seq_file *m, void *data)
+{
+ struct xe_device *xe = node_to_xe(m->private);
+ struct drm_printer p = drm_seq_file_printer(m);
+ struct xe_pcode_version version;
+ int ret = 0;
+
+ ret = xe_get_pcode_version(xe, &version);
+ if (ret)
+ return ret;
+
+ drm_printf(&p, "pcode version: %u.%u.%u\n", version.major,
+ version.minor, version.engg);
+ return 0;
+}
+
static int dgfx_pkg_residencies_show(struct seq_file *m, void *data)
{
struct xe_device *xe;
@@ -220,6 +237,10 @@ static const struct drm_info_list debugfs_list[] = {
{ .name = "workarounds", .show = workaround_info, },
};
+static const struct drm_info_list pcode_info_debugfs[] = {
+ { .name = "pcode_info", .show = pcode_info, },
+};
+
static const struct drm_info_list debugfs_residencies[] = {
{ .name = "dgfx_pkg_residencies", .show = dgfx_pkg_residencies_show, },
{ .name = "dgfx_pcie_link_residencies", .show = dgfx_pcie_link_residencies_show, },
@@ -566,6 +587,18 @@ void xe_debugfs_register(struct xe_device *xe)
&inject_csc_hw_error);
}
+ /*
+ * 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.
+ * 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))
+ 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);