nouveau_debugfs.h 883 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef __NOUVEAU_DEBUGFS_H__
  2. #define __NOUVEAU_DEBUGFS_H__
  3. #include <drm/drmP.h>
  4. #if defined(CONFIG_DEBUG_FS)
  5. #include "nouveau_drv.h"
  6. struct nouveau_debugfs {
  7. struct nvif_object ctrl;
  8. };
  9. static inline struct nouveau_debugfs *
  10. nouveau_debugfs(struct drm_device *dev)
  11. {
  12. return nouveau_drm(dev)->debugfs;
  13. }
  14. extern int nouveau_drm_debugfs_init(struct drm_minor *);
  15. extern void nouveau_drm_debugfs_cleanup(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 int
  20. nouveau_drm_debugfs_init(struct drm_minor *minor)
  21. {
  22. return 0;
  23. }
  24. static inline void
  25. nouveau_drm_debugfs_cleanup(struct drm_minor *minor)
  26. {
  27. }
  28. static inline int
  29. nouveau_debugfs_init(struct nouveau_drm *drm)
  30. {
  31. return 0;
  32. }
  33. static inline void
  34. nouveau_debugfs_fini(struct nouveau_drm *drm)
  35. {
  36. }
  37. #endif
  38. #endif