0192-drm-vc4-Add-a-debugfs-node-for-tracking-execution-st.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From fe67c3546abaaab10d826626fdd3dd147f6bd693 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Fri, 22 Jan 2016 13:06:39 -0800
  4. Subject: [PATCH 192/381] drm/vc4: Add a debugfs node for tracking execution
  5. state.
  6. Signed-off-by: Eric Anholt <eric@anholt.net>
  7. ---
  8. drivers/gpu/drm/vc4/vc4_debugfs.c | 1 +
  9. drivers/gpu/drm/vc4/vc4_drv.h | 1 +
  10. drivers/gpu/drm/vc4/vc4_gem.c | 14 ++++++++++++++
  11. 3 files changed, 16 insertions(+)
  12. --- a/drivers/gpu/drm/vc4/vc4_debugfs.c
  13. +++ b/drivers/gpu/drm/vc4/vc4_debugfs.c
  14. @@ -17,6 +17,7 @@
  15. static const struct drm_info_list vc4_debugfs_list[] = {
  16. {"bo_stats", vc4_bo_stats_debugfs, 0},
  17. + {"gem_exec", vc4_gem_exec_debugfs, 0},
  18. {"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
  19. {"hvs_regs", vc4_hvs_debugfs_regs, 0},
  20. {"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
  21. --- a/drivers/gpu/drm/vc4/vc4_drv.h
  22. +++ b/drivers/gpu/drm/vc4/vc4_drv.h
  23. @@ -403,6 +403,7 @@ void vc4_job_handle_completed(struct vc4
  24. int vc4_queue_seqno_cb(struct drm_device *dev,
  25. struct vc4_seqno_cb *cb, uint64_t seqno,
  26. void (*func)(struct vc4_seqno_cb *cb));
  27. +int vc4_gem_exec_debugfs(struct seq_file *m, void *arg);
  28. /* vc4_hdmi.c */
  29. extern struct platform_driver vc4_hdmi_driver;
  30. --- a/drivers/gpu/drm/vc4/vc4_gem.c
  31. +++ b/drivers/gpu/drm/vc4/vc4_gem.c
  32. @@ -31,6 +31,20 @@
  33. #include "vc4_regs.h"
  34. #include "vc4_trace.h"
  35. +#ifdef CONFIG_DEBUG_FS
  36. +int vc4_gem_exec_debugfs(struct seq_file *m, void *unused)
  37. +{
  38. + struct drm_info_node *node = (struct drm_info_node *)m->private;
  39. + struct drm_device *dev = node->minor->dev;
  40. + struct vc4_dev *vc4 = to_vc4_dev(dev);
  41. +
  42. + seq_printf(m, "Emitted seqno: 0x%016llx\n", vc4->emit_seqno);
  43. + seq_printf(m, "Finished seqno: 0x%016llx\n", vc4->finished_seqno);
  44. +
  45. + return 0;
  46. +}
  47. +#endif /* CONFIG_DEBUG_FS */
  48. +
  49. static void
  50. vc4_queue_hangcheck(struct drm_device *dev)
  51. {