nouveau_debugfs.h 771 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. #else
  19. static inline void
  20. nouveau_drm_debugfs_init(struct drm_minor *minor)
  21. {}
  22. static inline int
  23. nouveau_debugfs_init(struct nouveau_drm *drm)
  24. {
  25. return 0;
  26. }
  27. static inline void
  28. nouveau_debugfs_fini(struct nouveau_drm *drm)
  29. {
  30. }
  31. #endif
  32. #endif