nouveau_debugfs.h 1013 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: MIT */
  2. #ifndef __NOUVEAU_DEBUGFS_H__
  3. #define __NOUVEAU_DEBUGFS_H__
  4. #include <drm/drm_debugfs.h>
  5. #if defined(CONFIG_DEBUG_FS)
  6. #include "nouveau_drv.h"
  7. struct nouveau_debugfs {
  8. struct nvif_object ctrl;
  9. };
  10. static inline struct nouveau_debugfs *
  11. nouveau_debugfs(struct drm_device *dev)
  12. {
  13. return nouveau_drm(dev)->debugfs;
  14. }
  15. extern void nouveau_drm_debugfs_init(struct drm_minor *);
  16. extern int nouveau_debugfs_init(struct nouveau_drm *);
  17. extern void nouveau_debugfs_fini(struct nouveau_drm *);
  18. extern struct dentry *nouveau_debugfs_root;
  19. void nouveau_module_debugfs_init(void);
  20. void nouveau_module_debugfs_fini(void);
  21. #else
  22. static inline void
  23. nouveau_drm_debugfs_init(struct drm_minor *minor)
  24. {}
  25. static inline int
  26. nouveau_debugfs_init(struct nouveau_drm *drm)
  27. {
  28. return 0;
  29. }
  30. static inline void
  31. nouveau_debugfs_fini(struct nouveau_drm *drm)
  32. {
  33. }
  34. static inline void
  35. nouveau_module_debugfs_init(void)
  36. {
  37. }
  38. static inline void
  39. nouveau_module_debugfs_fini(void)
  40. {
  41. }
  42. #endif
  43. #endif