drm/xe/pat: Add debugfs node to dump PAT
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 6 Oct 2023 18:23:24 +0000 (11:23 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:42:57 +0000 (11:42 -0500)
commit34803f9a4b3ab20dbc09ad13ed5fa98263896b37
treeec1994c5de4cdf18f29c8a7f345654a6b6fe0d74
parent5803bdc8ad6f0320b3147de7e565c24b3afe31fb
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>
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_pat.c
drivers/gpu/drm/xe/xe_pat.h