]> git.ipfire.org Git - thirdparty/linux.git/blob - drivers/gpu/drm/nouveau/nouveau_debugfs.h
drm/nouveau: Fixup gk20a instobj hierarchy
[thirdparty/linux.git] / drivers / gpu / drm / nouveau / nouveau_debugfs.h
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NOUVEAU_DEBUGFS_H__
3 #define __NOUVEAU_DEBUGFS_H__
4
5 #include <drm/drm_debugfs.h>
6
7 #if defined(CONFIG_DEBUG_FS)
8
9 #include "nouveau_drv.h"
10
11 struct nouveau_debugfs {
12 struct nvif_object ctrl;
13 };
14
15 static inline struct nouveau_debugfs *
16 nouveau_debugfs(struct drm_device *dev)
17 {
18 return nouveau_drm(dev)->debugfs;
19 }
20
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 *);
24 #else
25 static inline void
26 nouveau_drm_debugfs_init(struct drm_minor *minor)
27 {}
28
29 static inline int
30 nouveau_debugfs_init(struct nouveau_drm *drm)
31 {
32 return 0;
33 }
34
35 static inline void
36 nouveau_debugfs_fini(struct nouveau_drm *drm)
37 {
38 }
39
40 #endif
41
42 #endif