summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_gt_debugfs.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-10-06 21:23:24 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:42:57 +0300
commit34803f9a4b3ab20dbc09ad13ed5fa98263896b37 (patch)
treeec1994c5de4cdf18f29c8a7f345654a6b6fe0d74 /drivers/gpu/drm/xe/xe_gt_debugfs.c
parent5803bdc8ad6f0320b3147de7e565c24b3afe31fb (diff)
downloadlinux-34803f9a4b3ab20dbc09ad13ed5fa98263896b37.tar.xz
drm/xe/pat: Add debugfs node to dump PAT
This is useful to debug cache issues, to double check if the PAT indexes match what they were supposed to be set to from spec. v2: Add separate functions for XeHP, XeHPC and XeLPG so it correctly reads the index based on MCR/REG registers and also decodes the fields (Matt Roper) v3: Starting with XeHPC, do not translate values to human-readable formats as the main goal is to make it easy to compare the table with the spec. Also, share a single array for xelp/xehp str map (Matt Roper) Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20231006182325.3617685-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gt_debugfs.c')
-rw-r--r--drivers/gpu/drm/xe/xe_gt_debugfs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index ec1ae00f6bfc..cd6d28c7b923 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -16,6 +16,7 @@
#include "xe_gt_topology.h"
#include "xe_hw_engine.h"
#include "xe_macros.h"
+#include "xe_pat.h"
#include "xe_reg_sr.h"
#include "xe_reg_whitelist.h"
#include "xe_uc_debugfs.h"
@@ -138,6 +139,16 @@ static int workarounds(struct seq_file *m, void *data)
return 0;
}
+static int pat(struct seq_file *m, void *data)
+{
+ struct xe_gt *gt = node_to_gt(m->private);
+ struct drm_printer p = drm_seq_file_printer(m);
+
+ xe_pat_dump(gt, &p);
+
+ return 0;
+}
+
static const struct drm_info_list debugfs_list[] = {
{"hw_engines", hw_engines, 0},
{"force_reset", force_reset, 0},
@@ -147,6 +158,7 @@ static const struct drm_info_list debugfs_list[] = {
{"ggtt", ggtt, 0},
{"register-save-restore", register_save_restore, 0},
{"workarounds", workarounds, 0},
+ {"pat", pat, 0},
};
void xe_gt_debugfs_register(struct xe_gt *gt)