1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NOUVEAU_DEBUGFS_H__
3 #define __NOUVEAU_DEBUGFS_H__
5 #include <drm/drm_debugfs.h>
7 #if defined(CONFIG_DEBUG_FS)
9 #include "nouveau_drv.h"
11 struct nouveau_debugfs {
12 struct nvif_object ctrl;
15 static inline struct nouveau_debugfs *
16 nouveau_debugfs(struct drm_device *dev)
18 return nouveau_drm(dev)->debugfs;
21 extern void nouveau_drm_debugfs_init(struct drm_minor *);
22 extern int nouveau_debugfs_init(struct nouveau_drm *);
23 extern void nouveau_debugfs_fini(struct nouveau_drm *);
25 extern struct dentry *nouveau_debugfs_root;
27 int nouveau_module_debugfs_init(void);
28 void nouveau_module_debugfs_fini(void);
31 nouveau_drm_debugfs_init(struct drm_minor *minor)
35 nouveau_debugfs_init(struct nouveau_drm *drm)
41 nouveau_debugfs_fini(struct nouveau_drm *drm)
46 nouveau_module_debugfs_init(void)
52 nouveau_module_debugfs_fini(void)