summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pat.h
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_pat.h
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_pat.h')
-rw-r--r--drivers/gpu/drm/xe/xe_pat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_pat.h b/drivers/gpu/drm/xe/xe_pat.h
index 168e80e63809..09c491ab9f15 100644
--- a/drivers/gpu/drm/xe/xe_pat.h
+++ b/drivers/gpu/drm/xe/xe_pat.h
@@ -6,6 +6,7 @@
#ifndef _XE_PAT_H_
#define _XE_PAT_H_
+struct drm_printer;
struct xe_gt;
struct xe_device;
@@ -21,4 +22,11 @@ void xe_pat_init_early(struct xe_device *xe);
*/
void xe_pat_init(struct xe_gt *gt);
+/**
+ * xe_pat_dump - Dump PAT table
+ * @gt: GT structure
+ * @p: Printer to dump info to
+ */
+void xe_pat_dump(struct xe_gt *gt, struct drm_printer *p);
+
#endif