]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
33b903e8 MS |
2 | #ifndef __NOUVEAU_DEBUGFS_H__ |
3 | #define __NOUVEAU_DEBUGFS_H__ | |
4 | ||
5 | #include <drm/drmP.h> | |
6 | ||
7 | #if defined(CONFIG_DEBUG_FS) | |
b126a200 | 8 | |
4dc28134 | 9 | #include "nouveau_drv.h" |
b126a200 KH |
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 | ||
56c101af | 21 | extern int nouveau_drm_debugfs_init(struct drm_minor *); |
b126a200 KH |
22 | extern int nouveau_debugfs_init(struct nouveau_drm *); |
23 | extern void nouveau_debugfs_fini(struct nouveau_drm *); | |
33b903e8 MS |
24 | #else |
25 | static inline int | |
56c101af | 26 | nouveau_drm_debugfs_init(struct drm_minor *minor) |
33b903e8 MS |
27 | { |
28 | return 0; | |
29 | } | |
30 | ||
b126a200 | 31 | static inline int |
38b17519 | 32 | nouveau_debugfs_init(struct nouveau_drm *drm) |
b126a200 KH |
33 | { |
34 | return 0; | |
35 | } | |
36 | ||
37 | static inline void | |
38b17519 | 38 | nouveau_debugfs_fini(struct nouveau_drm *drm) |
b126a200 KH |
39 | { |
40 | } | |
41 | ||
33b903e8 MS |
42 | #endif |
43 | ||
44 | #endif |