nouveau_debugfs.h 745 B

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