1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #if !defined(_VISL_TRACE_MPEG2_H_) || defined(TRACE_HEADER_MULTI_READ) 3 #define _VISL_TRACE_MPEG2_H_ 4 5 #include <linux/tracepoint.h> 6 #include "visl.h" 7 8 #undef TRACE_SYSTEM 9 #define TRACE_SYSTEM visl_mpeg2_controls 10 11 DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_seq_tmpl, 12 TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s), 13 TP_ARGS(s), 14 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_sequence, s)), 15 TP_fast_assign(__entry->s = *s;), 16 TP_printk("\nhorizontal_size %u\nvertical_size %u\nvbv_buffer_size %u\n" 17 "profile_and_level_indication %u\nchroma_format %u\nflags %s\n", 18 __entry->s.horizontal_size, 19 __entry->s.vertical_size, 20 __entry->s.vbv_buffer_size, 21 __entry->s.profile_and_level_indication, 22 __entry->s.chroma_format, 23 __print_flags(__entry->s.flags, "|", 24 {V4L2_MPEG2_SEQ_FLAG_PROGRESSIVE, "PROGRESSIVE"}) 25 ) 26 ); 27 28 DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_pic_tmpl, 29 TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p), 30 TP_ARGS(p), 31 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_picture, p)), 32 TP_fast_assign(__entry->p = *p;), 33 TP_printk("\nbackward_ref_ts %llu\nforward_ref_ts %llu\nflags %s\nf_code {%s}\n" 34 "picture_coding_type: %u\npicture_structure %u\nintra_dc_precision %u\n", 35 __entry->p.backward_ref_ts, 36 __entry->p.forward_ref_ts, 37 __print_flags(__entry->p.flags, "|", 38 {V4L2_MPEG2_PIC_FLAG_TOP_FIELD_FIRST, "TOP_FIELD_FIRST"}, 39 {V4L2_MPEG2_PIC_FLAG_FRAME_PRED_DCT, "FRAME_PRED_DCT"}, 40 {V4L2_MPEG2_PIC_FLAG_CONCEALMENT_MV, "CONCEALMENT_MV"}, 41 {V4L2_MPEG2_PIC_FLAG_Q_SCALE_TYPE, "Q_SCALE_TYPE"}, 42 {V4L2_MPEG2_PIC_FLAG_INTRA_VLC, "INTA_VLC"}, 43 {V4L2_MPEG2_PIC_FLAG_ALT_SCAN, "ALT_SCAN"}, 44 {V4L2_MPEG2_PIC_FLAG_REPEAT_FIRST, "REPEAT_FIRST"}, 45 {V4L2_MPEG2_PIC_FLAG_PROGRESSIVE, "PROGRESSIVE"}), 46 __print_hex_dump("", DUMP_PREFIX_NONE, 32, 1, 47 __entry->p.f_code, 48 sizeof(__entry->p.f_code), 49 false), 50 __entry->p.picture_coding_type, 51 __entry->p.picture_structure, 52 __entry->p.intra_dc_precision 53 ) 54 ); 55 56 DECLARE_EVENT_CLASS(v4l2_ctrl_mpeg2_quant_tmpl, 57 TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q), 58 TP_ARGS(q), 59 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_mpeg2_quantisation, q)), 60 TP_fast_assign(__entry->q = *q;), 61 TP_printk("\nintra_quantiser_matrix %s\nnon_intra_quantiser_matrix %s\n" 62 "chroma_intra_quantiser_matrix %s\nchroma_non_intra_quantiser_matrix %s\n", 63 __print_array(__entry->q.intra_quantiser_matrix, 64 ARRAY_SIZE(__entry->q.intra_quantiser_matrix), 65 sizeof(__entry->q.intra_quantiser_matrix[0])), 66 __print_array(__entry->q.non_intra_quantiser_matrix, 67 ARRAY_SIZE(__entry->q.non_intra_quantiser_matrix), 68 sizeof(__entry->q.non_intra_quantiser_matrix[0])), 69 __print_array(__entry->q.chroma_intra_quantiser_matrix, 70 ARRAY_SIZE(__entry->q.chroma_intra_quantiser_matrix), 71 sizeof(__entry->q.chroma_intra_quantiser_matrix[0])), 72 __print_array(__entry->q.chroma_non_intra_quantiser_matrix, 73 ARRAY_SIZE(__entry->q.chroma_non_intra_quantiser_matrix), 74 sizeof(__entry->q.chroma_non_intra_quantiser_matrix[0])) 75 ) 76 ) 77 78 DEFINE_EVENT(v4l2_ctrl_mpeg2_seq_tmpl, v4l2_ctrl_mpeg2_sequence, 79 TP_PROTO(const struct v4l2_ctrl_mpeg2_sequence *s), 80 TP_ARGS(s) 81 ); 82 83 DEFINE_EVENT(v4l2_ctrl_mpeg2_pic_tmpl, v4l2_ctrl_mpeg2_picture, 84 TP_PROTO(const struct v4l2_ctrl_mpeg2_picture *p), 85 TP_ARGS(p) 86 ); 87 88 DEFINE_EVENT(v4l2_ctrl_mpeg2_quant_tmpl, v4l2_ctrl_mpeg2_quantisation, 89 TP_PROTO(const struct v4l2_ctrl_mpeg2_quantisation *q), 90 TP_ARGS(q) 91 ); 92 93 #endif 94 95 #undef TRACE_INCLUDE_PATH 96 #undef TRACE_INCLUDE_FILE 97 #define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl 98 #define TRACE_INCLUDE_FILE visl-trace-mpeg2 99 #include <trace/define_trace.h> 100