mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
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>
This commit is contained in:
parent
f7c05238ab
commit
0f800465ec
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user