Praneeth Paladugu | 6e6fbdb | 2017-01-16 15:43:01 -0800 | [diff] [blame^] | 1 | /* Copyright (c) 2014-2017, 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_vidc |
| 15 | |
| 16 | #if !defined(_TRACE_MSM_VIDC_H_) || defined(TRACE_HEADER_MULTI_READ) |
| 17 | #define _TRACE_MSM_VIDC_H |
| 18 | #include <linux/types.h> |
| 19 | #include <linux/tracepoint.h> |
| 20 | |
| 21 | DECLARE_EVENT_CLASS(msm_v4l2_vidc, |
| 22 | |
| 23 | TP_PROTO(char *dummy), |
| 24 | |
| 25 | TP_ARGS(dummy), |
| 26 | |
| 27 | TP_STRUCT__entry( |
| 28 | __field(char *, dummy) |
| 29 | ), |
| 30 | |
| 31 | TP_fast_assign( |
| 32 | __entry->dummy = dummy; |
| 33 | ), |
| 34 | |
| 35 | TP_printk("%s", __entry->dummy) |
| 36 | ); |
| 37 | |
| 38 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_open_start, |
| 39 | |
| 40 | TP_PROTO(char *dummy), |
| 41 | |
| 42 | TP_ARGS(dummy) |
| 43 | ); |
| 44 | |
| 45 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_open_end, |
| 46 | |
| 47 | TP_PROTO(char *dummy), |
| 48 | |
| 49 | TP_ARGS(dummy) |
| 50 | ); |
| 51 | |
| 52 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_close_start, |
| 53 | |
| 54 | TP_PROTO(char *dummy), |
| 55 | |
| 56 | TP_ARGS(dummy) |
| 57 | ); |
| 58 | |
| 59 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_close_end, |
| 60 | |
| 61 | TP_PROTO(char *dummy), |
| 62 | |
| 63 | TP_ARGS(dummy) |
| 64 | ); |
| 65 | |
| 66 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_fw_load_start, |
| 67 | |
| 68 | TP_PROTO(char *dummy), |
| 69 | |
| 70 | TP_ARGS(dummy) |
| 71 | ); |
| 72 | |
| 73 | DEFINE_EVENT(msm_v4l2_vidc, msm_v4l2_vidc_fw_load_end, |
| 74 | |
| 75 | TP_PROTO(char *dummy), |
| 76 | |
| 77 | TP_ARGS(dummy) |
| 78 | ); |
| 79 | |
| 80 | DECLARE_EVENT_CLASS(msm_vidc_common, |
| 81 | |
| 82 | TP_PROTO(void *instp, int old_state, int new_state), |
| 83 | |
| 84 | TP_ARGS(instp, old_state, new_state), |
| 85 | |
| 86 | TP_STRUCT__entry( |
| 87 | __field(void *, instp) |
| 88 | __field(int, old_state) |
| 89 | __field(int, new_state) |
| 90 | ), |
| 91 | |
| 92 | TP_fast_assign( |
| 93 | __entry->instp = instp; |
| 94 | __entry->old_state = old_state; |
| 95 | __entry->new_state = new_state; |
| 96 | ), |
| 97 | |
| 98 | TP_printk("Moved inst: %p from 0x%x to 0x%x", |
| 99 | __entry->instp, |
| 100 | __entry->old_state, |
| 101 | __entry->new_state) |
| 102 | ); |
| 103 | |
| 104 | DEFINE_EVENT(msm_vidc_common, msm_vidc_common_state_change, |
| 105 | |
| 106 | TP_PROTO(void *instp, int old_state, int new_state), |
| 107 | |
| 108 | TP_ARGS(instp, old_state, new_state) |
| 109 | ); |
| 110 | |
| 111 | DECLARE_EVENT_CLASS(venus_hfi_var, |
| 112 | |
| 113 | TP_PROTO(u32 cp_start, u32 cp_size, |
| 114 | u32 cp_nonpixel_start, u32 cp_nonpixel_size), |
| 115 | |
| 116 | TP_ARGS(cp_start, cp_size, cp_nonpixel_start, cp_nonpixel_size), |
| 117 | |
| 118 | TP_STRUCT__entry( |
| 119 | __field(u32, cp_start) |
| 120 | __field(u32, cp_size) |
| 121 | __field(u32, cp_nonpixel_start) |
| 122 | __field(u32, cp_nonpixel_size) |
| 123 | ), |
| 124 | |
| 125 | TP_fast_assign( |
| 126 | __entry->cp_start = cp_start; |
| 127 | __entry->cp_size = cp_size; |
| 128 | __entry->cp_nonpixel_start = cp_nonpixel_start; |
| 129 | __entry->cp_nonpixel_size = cp_nonpixel_size; |
| 130 | ), |
| 131 | |
| 132 | TP_printk( |
| 133 | "TZBSP_MEM_PROTECT_VIDEO_VAR done, cp_start : 0x%x, cp_size : 0x%x, cp_nonpixel_start : 0x%x, cp_nonpixel_size : 0x%x", |
| 134 | __entry->cp_start, |
| 135 | __entry->cp_size, |
| 136 | __entry->cp_nonpixel_start, |
| 137 | __entry->cp_nonpixel_size) |
| 138 | ); |
| 139 | |
| 140 | DEFINE_EVENT(venus_hfi_var, venus_hfi_var_done, |
| 141 | |
| 142 | TP_PROTO(u32 cp_start, u32 cp_size, |
| 143 | u32 cp_nonpixel_start, u32 cp_nonpixel_size), |
| 144 | |
| 145 | TP_ARGS(cp_start, cp_size, cp_nonpixel_start, cp_nonpixel_size) |
| 146 | ); |
| 147 | |
| 148 | DECLARE_EVENT_CLASS(msm_v4l2_vidc_buffer_events, |
| 149 | |
| 150 | TP_PROTO(char *event_type, u32 device_addr, int64_t timestamp, |
| 151 | u32 alloc_len, u32 filled_len, u32 offset), |
| 152 | |
| 153 | TP_ARGS(event_type, device_addr, timestamp, alloc_len, |
| 154 | filled_len, offset), |
| 155 | |
| 156 | TP_STRUCT__entry( |
| 157 | __field(char *, event_type) |
| 158 | __field(u32, device_addr) |
| 159 | __field(int64_t, timestamp) |
| 160 | __field(u32, alloc_len) |
| 161 | __field(u32, filled_len) |
| 162 | __field(u32, offset) |
| 163 | ), |
| 164 | |
| 165 | TP_fast_assign( |
| 166 | __entry->event_type = event_type; |
| 167 | __entry->device_addr = device_addr; |
| 168 | __entry->timestamp = timestamp; |
| 169 | __entry->alloc_len = alloc_len; |
| 170 | __entry->filled_len = filled_len; |
| 171 | __entry->offset = offset; |
| 172 | ), |
| 173 | |
| 174 | TP_printk( |
| 175 | "%s, device_addr : 0x%x, timestamp : %lld, alloc_len : 0x%x, filled_len : 0x%x, offset : 0x%x", |
| 176 | __entry->event_type, |
| 177 | __entry->device_addr, |
| 178 | __entry->timestamp, |
| 179 | __entry->alloc_len, |
| 180 | __entry->filled_len, |
| 181 | __entry->offset) |
| 182 | ); |
| 183 | |
| 184 | DEFINE_EVENT(msm_v4l2_vidc_buffer_events, msm_v4l2_vidc_buffer_event_start, |
| 185 | |
| 186 | TP_PROTO(char *event_type, u32 device_addr, int64_t timestamp, |
| 187 | u32 alloc_len, u32 filled_len, u32 offset), |
| 188 | |
| 189 | TP_ARGS(event_type, device_addr, timestamp, alloc_len, |
| 190 | filled_len, offset) |
| 191 | ); |
| 192 | |
| 193 | DEFINE_EVENT(msm_v4l2_vidc_buffer_events, msm_v4l2_vidc_buffer_event_end, |
| 194 | |
| 195 | TP_PROTO(char *event_type, u32 device_addr, int64_t timestamp, |
| 196 | u32 alloc_len, u32 filled_len, u32 offset), |
| 197 | |
| 198 | TP_ARGS(event_type, device_addr, timestamp, alloc_len, |
| 199 | filled_len, offset) |
| 200 | ); |
| 201 | |
| 202 | DECLARE_EVENT_CLASS(msm_smem_buffer_ion_ops, |
| 203 | |
| 204 | TP_PROTO(char *buffer_op, u32 buffer_type, u32 heap_mask, |
| 205 | size_t size, u32 align, u32 flags, int map_kernel), |
| 206 | |
| 207 | TP_ARGS(buffer_op, buffer_type, heap_mask, size, align, |
| 208 | flags, map_kernel), |
| 209 | |
| 210 | TP_STRUCT__entry( |
| 211 | __field(char *, buffer_op) |
| 212 | __field(u32, buffer_type) |
| 213 | __field(u32, heap_mask) |
| 214 | __field(u32, size) |
| 215 | __field(u32, align) |
| 216 | __field(u32, flags) |
| 217 | __field(int, map_kernel) |
| 218 | ), |
| 219 | |
| 220 | TP_fast_assign( |
| 221 | __entry->buffer_op = buffer_op; |
| 222 | __entry->buffer_type = buffer_type; |
| 223 | __entry->heap_mask = heap_mask; |
| 224 | __entry->size = size; |
| 225 | __entry->align = align; |
| 226 | __entry->flags = flags; |
| 227 | __entry->map_kernel = map_kernel; |
| 228 | ), |
| 229 | |
| 230 | TP_printk( |
| 231 | "%s, buffer_type : 0x%x, heap_mask : 0x%x, size : 0x%x, align : 0x%x, flags : 0x%x, map_kernel : %d", |
| 232 | __entry->buffer_op, |
| 233 | __entry->buffer_type, |
| 234 | __entry->heap_mask, |
| 235 | __entry->size, |
| 236 | __entry->align, |
| 237 | __entry->flags, |
| 238 | __entry->map_kernel) |
| 239 | ); |
| 240 | |
| 241 | DEFINE_EVENT(msm_smem_buffer_ion_ops, msm_smem_buffer_ion_op_start, |
| 242 | |
| 243 | TP_PROTO(char *buffer_op, u32 buffer_type, u32 heap_mask, |
| 244 | size_t size, u32 align, u32 flags, int map_kernel), |
| 245 | |
| 246 | TP_ARGS(buffer_op, buffer_type, heap_mask, size, align, |
| 247 | flags, map_kernel) |
| 248 | ); |
| 249 | |
| 250 | DEFINE_EVENT(msm_smem_buffer_ion_ops, msm_smem_buffer_ion_op_end, |
| 251 | |
| 252 | TP_PROTO(char *buffer_op, u32 buffer_type, u32 heap_mask, |
| 253 | size_t size, u32 align, u32 flags, int map_kernel), |
| 254 | |
| 255 | TP_ARGS(buffer_op, buffer_type, heap_mask, size, align, |
| 256 | flags, map_kernel) |
| 257 | ); |
| 258 | |
| 259 | DECLARE_EVENT_CLASS(msm_smem_buffer_iommu_ops, |
| 260 | |
| 261 | TP_PROTO(char *buffer_op, int domain_num, int partition_num, |
| 262 | unsigned long align, unsigned long iova, |
| 263 | unsigned long buffer_size), |
| 264 | |
| 265 | TP_ARGS(buffer_op, domain_num, partition_num, align, iova, buffer_size), |
| 266 | |
| 267 | TP_STRUCT__entry( |
| 268 | __field(char *, buffer_op) |
| 269 | __field(int, domain_num) |
| 270 | __field(int, partition_num) |
| 271 | __field(unsigned long, align) |
| 272 | __field(unsigned long, iova) |
| 273 | __field(unsigned long, buffer_size) |
| 274 | ), |
| 275 | |
| 276 | TP_fast_assign( |
| 277 | __entry->buffer_op = buffer_op; |
| 278 | __entry->domain_num = domain_num; |
| 279 | __entry->partition_num = partition_num; |
| 280 | __entry->align = align; |
| 281 | __entry->iova = iova; |
| 282 | __entry->buffer_size = buffer_size; |
| 283 | ), |
| 284 | |
| 285 | TP_printk( |
| 286 | "%s, domain : %d, partition : %d, align : %lx, iova : 0x%lx, buffer_size=%lx", |
| 287 | __entry->buffer_op, |
| 288 | __entry->domain_num, |
| 289 | __entry->partition_num, |
| 290 | __entry->align, |
| 291 | __entry->iova, |
| 292 | __entry->buffer_size) |
| 293 | ); |
| 294 | |
| 295 | DEFINE_EVENT(msm_smem_buffer_iommu_ops, msm_smem_buffer_iommu_op_start, |
| 296 | |
| 297 | TP_PROTO(char *buffer_op, int domain_num, int partition_num, |
| 298 | unsigned long align, unsigned long iova, |
| 299 | unsigned long buffer_size), |
| 300 | |
| 301 | TP_ARGS(buffer_op, domain_num, partition_num, align, iova, buffer_size) |
| 302 | ); |
| 303 | |
| 304 | DEFINE_EVENT(msm_smem_buffer_iommu_ops, msm_smem_buffer_iommu_op_end, |
| 305 | |
| 306 | TP_PROTO(char *buffer_op, int domain_num, int partition_num, |
| 307 | unsigned long align, unsigned long iova, |
| 308 | unsigned long buffer_size), |
| 309 | |
| 310 | TP_ARGS(buffer_op, domain_num, partition_num, align, iova, buffer_size) |
| 311 | ); |
| 312 | |
| 313 | #endif |
| 314 | |
| 315 | #include <trace/define_trace.h> |