adreno_a2xx_trace.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* Copyright (c) 2011, 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. #if !defined(_ADRENO_A2XX_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
  14. #define _ADRENO_A2XX_TRACE_H
  15. #undef TRACE_SYSTEM
  16. #define TRACE_SYSTEM kgsl
  17. #undef TRACE_INCLUDE_PATH
  18. #define TRACE_INCLUDE_PATH .
  19. #undef TRACE_INCLUDE_FILE
  20. #define TRACE_INCLUDE_FILE adreno_a2xx_trace
  21. #include <linux/tracepoint.h>
  22. struct kgsl_device;
  23. /*
  24. * Tracepoint for a2xx irq. Includes status info
  25. */
  26. TRACE_EVENT(kgsl_a2xx_irq_status,
  27. TP_PROTO(struct kgsl_device *device, unsigned int master_status,
  28. unsigned int status),
  29. TP_ARGS(device, master_status, status),
  30. TP_STRUCT__entry(
  31. __string(device_name, device->name)
  32. __field(unsigned int, master_status)
  33. __field(unsigned int, status)
  34. ),
  35. TP_fast_assign(
  36. __assign_str(device_name, device->name);
  37. __entry->master_status = master_status;
  38. __entry->status = status;
  39. ),
  40. TP_printk(
  41. "d_name=%s master=%s status=%s",
  42. __get_str(device_name),
  43. __entry->master_status ? __print_flags(__entry->master_status,
  44. "|",
  45. { MASTER_INT_SIGNAL__MH_INT_STAT, "MH" },
  46. { MASTER_INT_SIGNAL__SQ_INT_STAT, "SQ" },
  47. { MASTER_INT_SIGNAL__CP_INT_STAT, "CP" },
  48. { MASTER_INT_SIGNAL__RBBM_INT_STAT, "RBBM" }) : "None",
  49. __entry->status ? __print_flags(__entry->status, "|",
  50. { CP_INT_CNTL__SW_INT_MASK, "SW" },
  51. { CP_INT_CNTL__T0_PACKET_IN_IB_MASK,
  52. "T0_PACKET_IN_IB" },
  53. { CP_INT_CNTL__OPCODE_ERROR_MASK, "OPCODE_ERROR" },
  54. { CP_INT_CNTL__PROTECTED_MODE_ERROR_MASK,
  55. "PROTECTED_MODE_ERROR" },
  56. { CP_INT_CNTL__RESERVED_BIT_ERROR_MASK,
  57. "RESERVED_BIT_ERROR" },
  58. { CP_INT_CNTL__IB_ERROR_MASK, "IB_ERROR" },
  59. { CP_INT_CNTL__IB2_INT_MASK, "IB2" },
  60. { CP_INT_CNTL__IB1_INT_MASK, "IB1" },
  61. { CP_INT_CNTL__RB_INT_MASK, "RB" }) : "None"
  62. )
  63. );
  64. #endif /* _ADRENO_A2XX_TRACE_H */
  65. /* This part must be outside protection */
  66. #include <trace/define_trace.h>