Skip to content

Commit 1d3ae92

Browse files
committed
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 <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 768fec5 commit 1d3ae92

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/gpu/drm/xe/xe_guc_debugfs.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ static int guc_log(struct seq_file *m, void *data)
4848
return 0;
4949
}
5050

51+
static int guc_log_dmesg(struct seq_file *m, void *data)
52+
{
53+
struct xe_guc *guc = node_to_guc(m->private);
54+
struct xe_device *xe = guc_to_xe(guc);
55+
56+
xe_pm_runtime_get(xe);
57+
xe_guc_log_print_dmesg(&guc->log);
58+
xe_pm_runtime_put(xe);
59+
60+
return 0;
61+
}
62+
5163
static int guc_ctb(struct seq_file *m, void *data)
5264
{
5365
struct xe_guc *guc = node_to_guc(m->private);
@@ -77,6 +89,7 @@ static int guc_pc(struct seq_file *m, void *data)
7789
static const struct drm_info_list debugfs_list[] = {
7890
{"guc_info", guc_info, 0},
7991
{"guc_log", guc_log, 0},
92+
{"guc_log_dmesg", guc_log_dmesg, 0},
8093
{"guc_ctb", guc_ctb, 0},
8194
{"guc_pc", guc_pc, 0},
8295
};

0 commit comments

Comments
 (0)