diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-01-31 20:17:16 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-02-12 06:41:30 +0300 |
commit | 1d3ae92191fdff18f765936107d723401204cc12 (patch) | |
tree | a9b9532b9737467c07170b23861bb907d4e68e6d | |
parent | 768fec5ff7c1d1183edb14ff7d68b07edc98a6e1 (diff) | |
download | linux-1d3ae92191fdff18f765936107d723401204cc12.tar.xz |
drm/xe/debugfs: Add node to dump guc log to dmesg
Currently xe_guc_log_print_dmesg() is unused, as it's expected
developers to add those calls when needed. However it makes it hard to
guarantee it's working as nothing is testing it. Add a node in debugfs
so it can be tested. This is purely for testing purposes since with the
device probed and working, the guc log can be obtained by the regular
debugfs file.
Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250131171716.3998432-1-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc_debugfs.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_debugfs.c b/drivers/gpu/drm/xe/xe_guc_debugfs.c index 0aff1d462bc0..c569ff456e74 100644 --- a/drivers/gpu/drm/xe/xe_guc_debugfs.c +++ b/drivers/gpu/drm/xe/xe_guc_debugfs.c @@ -48,6 +48,18 @@ static int guc_log(struct seq_file *m, void *data) return 0; } +static int guc_log_dmesg(struct seq_file *m, void *data) +{ + struct xe_guc *guc = node_to_guc(m->private); + struct xe_device *xe = guc_to_xe(guc); + + xe_pm_runtime_get(xe); + xe_guc_log_print_dmesg(&guc->log); + xe_pm_runtime_put(xe); + + return 0; +} + static int guc_ctb(struct seq_file *m, void *data) { struct xe_guc *guc = node_to_guc(m->private); @@ -77,6 +89,7 @@ static int guc_pc(struct seq_file *m, void *data) static const struct drm_info_list debugfs_list[] = { {"guc_info", guc_info, 0}, {"guc_log", guc_log, 0}, + {"guc_log_dmesg", guc_log_dmesg, 0}, {"guc_ctb", guc_ctb, 0}, {"guc_pc", guc_pc, 0}, }; |