msm_cam.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /* Copyright (c) 2016, 2018, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. #undef TRACE_SYSTEM
  14. #define TRACE_SYSTEM msm_cam
  15. #if !defined(_TRACE_MSM_VFE_H) || defined(TRACE_HEADER_MULTI_READ)
  16. #define _TRACE_MSM_VFE_H
  17. #include "msm_isp.h"
  18. #include <linux/types.h>
  19. #include <linux/tracepoint.h>
  20. #define STRING_LEN 80
  21. TRACE_EVENT(msm_cam_string,
  22. TP_PROTO(const char *str),
  23. TP_ARGS(str),
  24. TP_STRUCT__entry(
  25. __array(char, str, STRING_LEN)
  26. ),
  27. TP_fast_assign(
  28. strlcpy(__entry->str, str, STRING_LEN);
  29. ),
  30. TP_printk("msm_cam: %s", __entry->str)
  31. );
  32. TRACE_EVENT(msm_cam_tasklet_debug_dump,
  33. TP_PROTO(struct msm_vfe_irq_debug_info tasklet_state),
  34. TP_ARGS(tasklet_state),
  35. TP_STRUCT__entry(
  36. __field(unsigned int, vfe_id)
  37. __field(unsigned int, core_id)
  38. __field(unsigned int, irq_status0)
  39. __field(unsigned int, irq_status1)
  40. __field(unsigned int, ping_pong_status)
  41. __field(long, tv_sec)
  42. __field(long, tv_usec)
  43. ),
  44. TP_fast_assign(
  45. __entry->vfe_id = tasklet_state.vfe_id;
  46. __entry->irq_status0 =
  47. tasklet_state.irq_status0[tasklet_state.vfe_id];
  48. __entry->irq_status1 =
  49. tasklet_state.irq_status1[tasklet_state.vfe_id];
  50. __entry->core_id = tasklet_state.core_id;
  51. __entry->ping_pong_status =
  52. tasklet_state.ping_pong_status[tasklet_state.vfe_id];
  53. __entry->tv_sec =
  54. tasklet_state.ts.buf_time.tv_sec;
  55. __entry->tv_usec =
  56. tasklet_state.ts.buf_time.tv_usec;
  57. ),
  58. TP_printk("vfe_id %d, core %d, irq_st0 0x%x, irq_st1 0x%x\n"
  59. "pi_po_st 0x%x, time %ld:%ld",
  60. __entry->vfe_id,
  61. __entry->core_id,
  62. __entry->irq_status0,
  63. __entry->irq_status1,
  64. __entry->ping_pong_status,
  65. __entry->tv_sec,
  66. __entry->tv_usec
  67. )
  68. );
  69. TRACE_EVENT(msm_cam_ping_pong_debug_dump,
  70. TP_PROTO(struct msm_vfe_irq_debug_info ping_pong_state),
  71. TP_ARGS(ping_pong_state),
  72. TP_STRUCT__entry(
  73. __field(unsigned int, curr_vfe_id)
  74. __field(unsigned int, curr_irq_status0)
  75. __field(unsigned int, curr_irq_status1)
  76. __field(unsigned int, curr_ping_pong_status)
  77. __field(unsigned int, othr_vfe_id)
  78. __field(unsigned int, othr_irq_status0)
  79. __field(unsigned int, othr_irq_status1)
  80. __field(unsigned int, othr_ping_pong_status)
  81. __field(long, othr_tv_sec)
  82. __field(long, othr_tv_usec)
  83. __field(unsigned int, core_id)
  84. ),
  85. TP_fast_assign(
  86. __entry->curr_vfe_id =
  87. ping_pong_state.vfe_id;
  88. __entry->curr_irq_status0 =
  89. ping_pong_state.irq_status0[ping_pong_state.vfe_id];
  90. __entry->curr_irq_status1 =
  91. ping_pong_state.irq_status1[ping_pong_state.vfe_id];
  92. __entry->curr_ping_pong_status =
  93. ping_pong_state.
  94. ping_pong_status[ping_pong_state.vfe_id];
  95. __entry->othr_vfe_id =
  96. !ping_pong_state.vfe_id;
  97. __entry->othr_irq_status0 =
  98. ping_pong_state.irq_status0[!ping_pong_state.vfe_id];
  99. __entry->othr_irq_status1 =
  100. ping_pong_state.irq_status1[!ping_pong_state.vfe_id];
  101. __entry->othr_ping_pong_status =
  102. ping_pong_state.
  103. ping_pong_status[!ping_pong_state.vfe_id];
  104. __entry->othr_tv_sec =
  105. ping_pong_state.ts.buf_time.tv_sec;
  106. __entry->othr_tv_usec =
  107. ping_pong_state.ts.buf_time.tv_usec;
  108. __entry->core_id = ping_pong_state.core_id;
  109. ),
  110. TP_printk("vfe_id %d, irq_st0 0x%x, irq_st1 0x%x, pi_po_st 0x%x\n"
  111. "other vfe_id %d, irq_st0 0x%x, irq_st1 0x%x\n"
  112. "pi_po_st 0x%x, time %ld:%ld core %d",
  113. __entry->curr_vfe_id,
  114. __entry->curr_irq_status0,
  115. __entry->curr_irq_status1,
  116. __entry->curr_ping_pong_status,
  117. __entry->othr_vfe_id,
  118. __entry->othr_irq_status0,
  119. __entry->othr_irq_status1,
  120. __entry->othr_ping_pong_status,
  121. __entry->othr_tv_sec,
  122. __entry->othr_tv_usec,
  123. __entry->core_id
  124. )
  125. );
  126. #endif /* _MSM_CAM_TRACE_H */
  127. /* This part must be outside protection */
  128. #include <trace/define_trace.h>