1 // SPDX-License-Identifier: MIT
3 * Copyright © 2020 Intel Corporation
6 #include <drm/drm_print.h>
8 #include "gt/debugfs_gt.h"
10 #include "intel_guc_debugfs.h"
11 #include "intel_guc_log_debugfs.h"
13 static int guc_info_show(struct seq_file
*m
, void *data
)
15 struct intel_guc
*guc
= m
->private;
16 struct drm_printer p
= drm_seq_file_printer(m
);
18 if (!intel_guc_is_supported(guc
))
21 intel_guc_load_status(guc
, &p
);
23 intel_guc_log_info(&guc
->log
, &p
);
25 /* Add more as required ... */
29 DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_info
);
31 void intel_guc_debugfs_register(struct intel_guc
*guc
, struct dentry
*root
)
33 static const struct debugfs_gt_file files
[] = {
34 { "guc_info", &guc_info_fops
, NULL
},
37 if (!intel_guc_is_supported(guc
))
40 intel_gt_debugfs_register_files(root
, files
, ARRAY_SIZE(files
), guc
);
41 intel_guc_log_debugfs_register(&guc
->log
, root
);