Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gt / debugfs_gt.h
blobf77540f727e94d197e5c293267fef0dd2dbade31
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2019 Intel Corporation
4 */
6 #ifndef DEBUGFS_GT_H
7 #define DEBUGFS_GT_H
9 #include <linux/file.h>
11 struct intel_gt;
13 #define DEFINE_GT_DEBUGFS_ATTRIBUTE(__name) \
14 static int __name ## _open(struct inode *inode, struct file *file) \
15 { \
16 return single_open(file, __name ## _show, inode->i_private); \
17 } \
18 static const struct file_operations __name ## _fops = { \
19 .owner = THIS_MODULE, \
20 .open = __name ## _open, \
21 .read = seq_read, \
22 .llseek = seq_lseek, \
23 .release = single_release, \
26 void debugfs_gt_register(struct intel_gt *gt);
28 struct debugfs_gt_file {
29 const char *name;
30 const struct file_operations *fops;
31 bool (*eval)(void *data);
34 void intel_gt_debugfs_register_files(struct dentry *root,
35 const struct debugfs_gt_file *files,
36 unsigned long count, void *data);
38 #endif /* DEBUGFS_GT_H */