1 // SPDX-License-Identifier: MIT
3 * Copyright © 2023 Intel Corporation
6 #include <drm/drm_print.h>
8 #include "gt/intel_gt.h"
9 #include "gt/intel_gt_debugfs.h"
10 #include "gt/intel_gt_print.h"
11 #include "intel_gsc_uc.h"
12 #include "intel_gsc_uc_debugfs.h"
15 static int gsc_info_show(struct seq_file *m, void *data)
17 struct drm_printer p = drm_seq_file_printer(m);
18 struct intel_gsc_uc *gsc = m->private;
20 if (!intel_gsc_uc_is_supported(gsc))
23 intel_gsc_uc_load_status(gsc, &p);
27 DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(gsc_info);
29 void intel_gsc_uc_debugfs_register(struct intel_gsc_uc *gsc_uc, struct dentry *root)
31 static const struct intel_gt_debugfs_file files[] = {
32 { "gsc_info", &gsc_info_fops, NULL },
35 if (!intel_gsc_uc_is_supported(gsc_uc))
38 intel_gt_debugfs_register_files(root, files, ARRAY_SIZE(files), gsc_uc);