1 // SPDX-License-Identifier: MIT
4 * Copyright © 2019 Intel Corporation
7 #include <linux/debugfs.h>
9 #include "debugfs_engines.h"
10 #include "debugfs_gt.h"
11 #include "debugfs_gt_pm.h"
12 #include "intel_sseu_debugfs.h"
13 #include "uc/intel_uc_debugfs.h"
16 void debugfs_gt_register(struct intel_gt
*gt
)
20 if (!gt
->i915
->drm
.primary
->debugfs_root
)
23 root
= debugfs_create_dir("gt", gt
->i915
->drm
.primary
->debugfs_root
);
27 debugfs_engines_register(gt
, root
);
28 debugfs_gt_pm_register(gt
, root
);
29 intel_sseu_debugfs_register(gt
, root
);
31 intel_uc_debugfs_register(>
->uc
, root
);
34 void intel_gt_debugfs_register_files(struct dentry
*root
,
35 const struct debugfs_gt_file
*files
,
36 unsigned long count
, void *data
)
39 umode_t mode
= files
->fops
->write
? 0644 : 0444;
40 if (!files
->eval
|| files
->eval(data
))
41 debugfs_create_file(files
->name
,