vc4_debugfs.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright © 2014 Broadcom
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/seq_file.h>
  9. #include <linux/circ_buf.h>
  10. #include <linux/ctype.h>
  11. #include <linux/debugfs.h>
  12. #include <drm/drmP.h>
  13. #include "vc4_drv.h"
  14. #include "vc4_regs.h"
  15. static const struct drm_info_list vc4_debugfs_list[] = {
  16. {"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
  17. {"hvs_regs", vc4_hvs_debugfs_regs, 0},
  18. {"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
  19. {"crtc1_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)1},
  20. {"crtc2_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)2},
  21. };
  22. #define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list)
  23. int
  24. vc4_debugfs_init(struct drm_minor *minor)
  25. {
  26. return drm_debugfs_create_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES,
  27. minor->debugfs_root, minor);
  28. }
  29. void
  30. vc4_debugfs_cleanup(struct drm_minor *minor)
  31. {
  32. drm_debugfs_remove_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES, minor);
  33. }