WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gt / uc / intel_guc_debugfs.c
blobfe7cb7b29a1eae1a0941c8a47fa4e6f14baa9ae8
1 // SPDX-License-Identifier: MIT
2 /*
3 * Copyright © 2020 Intel Corporation
4 */
6 #include <drm/drm_print.h>
8 #include "gt/debugfs_gt.h"
9 #include "intel_guc.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))
19 return -ENODEV;
21 intel_guc_load_status(guc, &p);
22 drm_puts(&p, "\n");
23 intel_guc_log_info(&guc->log, &p);
25 /* Add more as required ... */
27 return 0;
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))
38 return;
40 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), guc);
41 intel_guc_log_debugfs_register(&guc->log, root);