WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gt / uc / intel_huc_debugfs.c
blob5733c15fd123d48e01fb21805c92587854ca1602
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_huc.h"
10 #include "intel_huc_debugfs.h"
12 static int huc_info_show(struct seq_file *m, void *data)
14 struct intel_huc *huc = m->private;
15 struct drm_printer p = drm_seq_file_printer(m);
17 if (!intel_huc_is_supported(huc))
18 return -ENODEV;
20 intel_huc_load_status(huc, &p);
22 return 0;
24 DEFINE_GT_DEBUGFS_ATTRIBUTE(huc_info);
26 void intel_huc_debugfs_register(struct intel_huc *huc, struct dentry *root)
28 static const struct debugfs_gt_file files[] = {
29 { "huc_info", &huc_info_fops, NULL },
32 if (!intel_huc_is_supported(huc))
33 return;
35 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), huc);