GNU Linux-libre 4.9.304-gnu1
[releases.git] / drivers / gpu / drm / nouveau / nouveau_debugfs.h
1 #ifndef __NOUVEAU_DEBUGFS_H__
2 #define __NOUVEAU_DEBUGFS_H__
3
4 #include <drm/drmP.h>
5
6 #if defined(CONFIG_DEBUG_FS)
7
8 #include "nouveau_drv.h"
9
10 struct nouveau_debugfs {
11         struct nvif_object ctrl;
12 };
13
14 static inline struct nouveau_debugfs *
15 nouveau_debugfs(struct drm_device *dev)
16 {
17         return nouveau_drm(dev)->debugfs;
18 }
19
20 extern int  nouveau_drm_debugfs_init(struct drm_minor *);
21 extern void nouveau_drm_debugfs_cleanup(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 int
26 nouveau_drm_debugfs_init(struct drm_minor *minor)
27 {
28        return 0;
29 }
30
31 static inline void
32 nouveau_drm_debugfs_cleanup(struct drm_minor *minor)
33 {
34 }
35
36 static inline int
37 nouveau_debugfs_init(struct nouveau_drm *drm)
38 {
39         return 0;
40 }
41
42 static inline void
43 nouveau_debugfs_fini(struct nouveau_drm *drm)
44 {
45 }
46
47 #endif
48
49 #endif