nouveau_debugfs.h 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __NOUVEAU_DEBUGFS_H__
  3. #define __NOUVEAU_DEBUGFS_H__
  4. #include <drm/drmP.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 int 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 int
  20. nouveau_drm_debugfs_init(struct drm_minor *minor)
  21. {
  22. return 0;
  23. }
  24. static inline int
  25. nouveau_debugfs_init(struct nouveau_drm *drm)
  26. {
  27. return 0;
  28. }
  29. static inline void
  30. nouveau_debugfs_fini(struct nouveau_drm *drm)
  31. {
  32. }
  33. #endif
  34. #endif