diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2023-03-14 03:30:02 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:29:47 +0300 |
commit | 6647e2fe23f595dc46780b7cc26be872ca168643 (patch) | |
tree | 5cbbde0c9d5e9b8d69665af6db296c0534306b7f /drivers/gpu/drm/xe/xe_gt_debugfs.c | |
parent | d855d2246ea6b04cbda372846b21c040fb068575 (diff) | |
download | linux-6647e2fe23f595dc46780b7cc26be872ca168643.tar.xz |
drm/xe/debugfs: Dump register save-restore tables
Add debugfs entry to dump the final tables with register save-restore
information.
For the workarounds, this has a format a little bit different than when the
values are applied because we don't want to read the values from the HW
when dumping via debugfs. For whitelist it just re-uses the print
function added for when the whitelist is being built.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://lore.kernel.org/r/20230314003012.2600353-5-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.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c index 78942e12e76c..9fab8017490f 100644 --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c @@ -16,6 +16,8 @@ #include "xe_gt_topology.h" #include "xe_hw_engine.h" #include "xe_macros.h" +#include "xe_reg_sr.h" +#include "xe_reg_whitelist.h" #include "xe_uc_debugfs.h" static struct xe_gt *node_to_gt(struct drm_info_node *node) @@ -98,6 +100,33 @@ static int ggtt(struct seq_file *m, void *data) return xe_ggtt_dump(gt->mem.ggtt, &p); } +static int register_save_restore(struct seq_file *m, void *data) +{ + struct xe_gt *gt = node_to_gt(m->private); + struct drm_printer p = drm_seq_file_printer(m); + struct xe_hw_engine *hwe; + enum xe_hw_engine_id id; + + xe_reg_sr_dump(>->reg_sr, &p); + drm_printf(&p, "\n"); + + drm_printf(&p, "Engine\n"); + for_each_hw_engine(hwe, gt, id) + xe_reg_sr_dump(&hwe->reg_sr, &p); + drm_printf(&p, "\n"); + + drm_printf(&p, "LRC\n"); + for_each_hw_engine(hwe, gt, id) + xe_reg_sr_dump(&hwe->reg_lrc, &p); + drm_printf(&p, "\n"); + + drm_printf(&p, "Whitelist\n"); + for_each_hw_engine(hwe, gt, id) + xe_reg_whitelist_dump(&hwe->reg_whitelist, &p); + + return 0; +} + static const struct drm_info_list debugfs_list[] = { {"hw_engines", hw_engines, 0}, {"force_reset", force_reset, 0}, @@ -105,6 +134,7 @@ static const struct drm_info_list debugfs_list[] = { {"topology", topology, 0}, {"steering", steering, 0}, {"ggtt", ggtt, 0}, + {"register-save-restore", register_save_restore, 0}, }; void xe_gt_debugfs_register(struct xe_gt *gt) |