Marcin Slusarz | 33b903e | 2013-02-08 21:42:13 +0100 | [diff] [blame] | 1 | #ifndef __NOUVEAU_DEBUGFS_H__ |
| 2 | #define __NOUVEAU_DEBUGFS_H__ |
| 3 | |
| 4 | #include <drm/drmP.h> |
| 5 | |
| 6 | #if defined(CONFIG_DEBUG_FS) |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 7 | |
Ben Skeggs | 4dc2813 | 2016-05-20 09:22:55 +1000 | [diff] [blame] | 8 | #include "nouveau_drv.h" |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 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 | |
Karol Herbst | 56c101a | 2015-07-31 00:35:42 +0200 | [diff] [blame] | 20 | extern int nouveau_drm_debugfs_init(struct drm_minor *); |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 21 | extern int nouveau_debugfs_init(struct nouveau_drm *); |
| 22 | extern void nouveau_debugfs_fini(struct nouveau_drm *); |
Marcin Slusarz | 33b903e | 2013-02-08 21:42:13 +0100 | [diff] [blame] | 23 | #else |
| 24 | static inline int |
Karol Herbst | 56c101a | 2015-07-31 00:35:42 +0200 | [diff] [blame] | 25 | nouveau_drm_debugfs_init(struct drm_minor *minor) |
Marcin Slusarz | 33b903e | 2013-02-08 21:42:13 +0100 | [diff] [blame] | 26 | { |
| 27 | return 0; |
| 28 | } |
| 29 | |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 30 | static inline int |
Arnd Bergmann | 38b1751 | 2016-01-13 14:48:13 +0100 | [diff] [blame] | 31 | nouveau_debugfs_init(struct nouveau_drm *drm) |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 32 | { |
| 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | static inline void |
Arnd Bergmann | 38b1751 | 2016-01-13 14:48:13 +0100 | [diff] [blame] | 37 | nouveau_debugfs_fini(struct nouveau_drm *drm) |
Karol Herbst | b126a20 | 2015-07-30 11:52:23 +0200 | [diff] [blame] | 38 | { |
| 39 | } |
| 40 | |
Marcin Slusarz | 33b903e | 2013-02-08 21:42:13 +0100 | [diff] [blame] | 41 | #endif |
| 42 | |
| 43 | #endif |