1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_VISL_TRACE_VP9_H_) || defined(TRACE_HEADER_MULTI_READ)
3 #define _VISL_TRACE_VP9_H_
5 #include <linux/tracepoint.h>
9 #define TRACE_SYSTEM visl_vp9_controls
11 DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_frame_tmpl
,
12 TP_PROTO(const struct v4l2_ctrl_vp9_frame
*f
),
14 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_frame
, f
)),
15 TP_fast_assign(__entry
->f
= *f
;),
16 TP_printk("\nlf.ref_deltas %s\n"
21 "quant.base_q_idx %u\n"
22 "quant.delta_q_y_dc %d\n"
23 "quant.delta_q_uv_dc %d\n"
24 "quant.delta_q_uv_ac %d\n"
25 "seg.feature_data {%s}\n"
26 "seg.feature_enabled %s\n"
31 "compressed_header_size %u\n"
32 "uncompressed_header_size %u\n"
33 "frame_width_minus_1 %u\n"
34 "frame_height_minus_1 %u\n"
35 "render_width_minus_1 %u\n"
36 "render_height_minus_1 %u\n"
37 "last_frame_ts %llu\n"
38 "golden_frame_ts %llu\n"
40 "ref_frame_sign_bias %s\n"
41 "reset_frame_context %s\n"
42 "frame_context_idx %u\n"
45 "interpolation_filter %s\n"
47 "tile_rows_log_2 %u\n"
48 "reference_mode %s\n",
49 __print_array(__entry
->f
.lf
.ref_deltas
,
50 ARRAY_SIZE(__entry
->f
.lf
.ref_deltas
),
51 sizeof(__entry
->f
.lf
.ref_deltas
[0])),
52 __print_array(__entry
->f
.lf
.mode_deltas
,
53 ARRAY_SIZE(__entry
->f
.lf
.mode_deltas
),
54 sizeof(__entry
->f
.lf
.mode_deltas
[0])),
56 __entry
->f
.lf
.sharpness
,
57 __print_flags(__entry
->f
.lf
.flags
, "|",
58 {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_ENABLED
, "DELTA_ENABLED"},
59 {V4L2_VP9_LOOP_FILTER_FLAG_DELTA_UPDATE
, "DELTA_UPDATE"}),
60 __entry
->f
.quant
.base_q_idx
,
61 __entry
->f
.quant
.delta_q_y_dc
,
62 __entry
->f
.quant
.delta_q_uv_dc
,
63 __entry
->f
.quant
.delta_q_uv_ac
,
64 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
65 __entry
->f
.seg
.feature_data
,
66 sizeof(__entry
->f
.seg
.feature_data
),
68 __print_array(__entry
->f
.seg
.feature_enabled
,
69 ARRAY_SIZE(__entry
->f
.seg
.feature_enabled
),
70 sizeof(__entry
->f
.seg
.feature_enabled
[0])),
71 __print_array(__entry
->f
.seg
.tree_probs
,
72 ARRAY_SIZE(__entry
->f
.seg
.tree_probs
),
73 sizeof(__entry
->f
.seg
.tree_probs
[0])),
74 __print_array(__entry
->f
.seg
.pred_probs
,
75 ARRAY_SIZE(__entry
->f
.seg
.pred_probs
),
76 sizeof(__entry
->f
.seg
.pred_probs
[0])),
77 __print_flags(__entry
->f
.seg
.flags
, "|",
78 {V4L2_VP9_SEGMENTATION_FLAG_ENABLED
, "ENABLED"},
79 {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_MAP
, "UPDATE_MAP"},
80 {V4L2_VP9_SEGMENTATION_FLAG_TEMPORAL_UPDATE
, "TEMPORAL_UPDATE"},
81 {V4L2_VP9_SEGMENTATION_FLAG_UPDATE_DATA
, "UPDATE_DATA"},
82 {V4L2_VP9_SEGMENTATION_FLAG_ABS_OR_DELTA_UPDATE
, "ABS_OR_DELTA_UPDATE"}),
83 __print_flags(__entry
->f
.flags
, "|",
84 {V4L2_VP9_FRAME_FLAG_KEY_FRAME
, "KEY_FRAME"},
85 {V4L2_VP9_FRAME_FLAG_SHOW_FRAME
, "SHOW_FRAME"},
86 {V4L2_VP9_FRAME_FLAG_ERROR_RESILIENT
, "ERROR_RESILIENT"},
87 {V4L2_VP9_FRAME_FLAG_INTRA_ONLY
, "INTRA_ONLY"},
88 {V4L2_VP9_FRAME_FLAG_ALLOW_HIGH_PREC_MV
, "ALLOW_HIGH_PREC_MV"},
89 {V4L2_VP9_FRAME_FLAG_REFRESH_FRAME_CTX
, "REFRESH_FRAME_CTX"},
90 {V4L2_VP9_FRAME_FLAG_PARALLEL_DEC_MODE
, "PARALLEL_DEC_MODE"},
91 {V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING
, "X_SUBSAMPLING"},
92 {V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING
, "Y_SUBSAMPLING"},
93 {V4L2_VP9_FRAME_FLAG_COLOR_RANGE_FULL_SWING
, "COLOR_RANGE_FULL_SWING"}),
94 __entry
->f
.compressed_header_size
,
95 __entry
->f
.uncompressed_header_size
,
96 __entry
->f
.frame_width_minus_1
,
97 __entry
->f
.frame_height_minus_1
,
98 __entry
->f
.render_width_minus_1
,
99 __entry
->f
.render_height_minus_1
,
100 __entry
->f
.last_frame_ts
,
101 __entry
->f
.golden_frame_ts
,
102 __entry
->f
.alt_frame_ts
,
103 __print_symbolic(__entry
->f
.ref_frame_sign_bias
,
104 {V4L2_VP9_SIGN_BIAS_LAST
, "SIGN_BIAS_LAST"},
105 {V4L2_VP9_SIGN_BIAS_GOLDEN
, "SIGN_BIAS_GOLDEN"},
106 {V4L2_VP9_SIGN_BIAS_ALT
, "SIGN_BIAS_ALT"}),
107 __print_symbolic(__entry
->f
.reset_frame_context
,
108 {V4L2_VP9_RESET_FRAME_CTX_NONE
, "RESET_FRAME_CTX_NONE"},
109 {V4L2_VP9_RESET_FRAME_CTX_SPEC
, "RESET_FRAME_CTX_SPEC"},
110 {V4L2_VP9_RESET_FRAME_CTX_ALL
, "RESET_FRAME_CTX_ALL"}),
111 __entry
->f
.frame_context_idx
,
113 __entry
->f
.bit_depth
,
114 __print_symbolic(__entry
->f
.interpolation_filter
,
115 {V4L2_VP9_INTERP_FILTER_EIGHTTAP
, "INTERP_FILTER_EIGHTTAP"},
116 {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SMOOTH
, "INTERP_FILTER_EIGHTTAP_SMOOTH"},
117 {V4L2_VP9_INTERP_FILTER_EIGHTTAP_SHARP
, "INTERP_FILTER_EIGHTTAP_SHARP"},
118 {V4L2_VP9_INTERP_FILTER_BILINEAR
, "INTERP_FILTER_BILINEAR"},
119 {V4L2_VP9_INTERP_FILTER_SWITCHABLE
, "INTERP_FILTER_SWITCHABLE"}),
120 __entry
->f
.tile_cols_log2
,
121 __entry
->f
.tile_rows_log2
,
122 __print_symbolic(__entry
->f
.reference_mode
,
123 {V4L2_VP9_REFERENCE_MODE_SINGLE_REFERENCE
, "REFERENCE_MODE_SINGLE_REFERENCE"},
124 {V4L2_VP9_REFERENCE_MODE_COMPOUND_REFERENCE
, "REFERENCE_MODE_COMPOUND_REFERENCE"},
125 {V4L2_VP9_REFERENCE_MODE_SELECT
, "REFERENCE_MODE_SELECT"}))
128 DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_hdr_tmpl
,
129 TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr
*h
),
131 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr
, h
)),
132 TP_fast_assign(__entry
->h
= *h
;),
133 TP_printk("\ntx_mode %s\n"
139 "interp_filter {%s}\n"
147 __print_symbolic(__entry
->h
.tx_mode
,
148 {V4L2_VP9_TX_MODE_ONLY_4X4
, "TX_MODE_ONLY_4X4"},
149 {V4L2_VP9_TX_MODE_ALLOW_8X8
, "TX_MODE_ALLOW_8X8"},
150 {V4L2_VP9_TX_MODE_ALLOW_16X16
, "TX_MODE_ALLOW_16X16"},
151 {V4L2_VP9_TX_MODE_ALLOW_32X32
, "TX_MODE_ALLOW_32X32"},
152 {V4L2_VP9_TX_MODE_SELECT
, "TX_MODE_SELECT"}),
153 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
155 sizeof(__entry
->h
.tx8
),
157 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
159 sizeof(__entry
->h
.tx16
),
161 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
163 sizeof(__entry
->h
.tx32
),
165 __print_array(__entry
->h
.skip
,
166 ARRAY_SIZE(__entry
->h
.skip
),
167 sizeof(__entry
->h
.skip
[0])),
168 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
169 __entry
->h
.inter_mode
,
170 sizeof(__entry
->h
.inter_mode
),
172 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
173 __entry
->h
.interp_filter
,
174 sizeof(__entry
->h
.interp_filter
),
176 __print_array(__entry
->h
.is_inter
,
177 ARRAY_SIZE(__entry
->h
.is_inter
),
178 sizeof(__entry
->h
.is_inter
[0])),
179 __print_array(__entry
->h
.comp_mode
,
180 ARRAY_SIZE(__entry
->h
.comp_mode
),
181 sizeof(__entry
->h
.comp_mode
[0])),
182 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
183 __entry
->h
.single_ref
,
184 sizeof(__entry
->h
.single_ref
),
186 __print_array(__entry
->h
.comp_ref
,
187 ARRAY_SIZE(__entry
->h
.comp_ref
),
188 sizeof(__entry
->h
.comp_ref
[0])),
189 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
191 sizeof(__entry
->h
.y_mode
),
193 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
195 sizeof(__entry
->h
.uv_mode
),
197 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
198 __entry
->h
.partition
,
199 sizeof(__entry
->h
.partition
),
204 DECLARE_EVENT_CLASS(v4l2_ctrl_vp9_compressed_coef_tmpl
,
205 TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr
*h
),
207 TP_STRUCT__entry(__field_struct(struct v4l2_ctrl_vp9_compressed_hdr
, h
)),
208 TP_fast_assign(__entry
->h
= *h
;),
209 TP_printk("\n coef {%s}",
210 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
212 sizeof(__entry
->h
.coef
),
217 DECLARE_EVENT_CLASS(v4l2_vp9_mv_probs_tmpl
,
218 TP_PROTO(const struct v4l2_vp9_mv_probs
*p
),
220 TP_STRUCT__entry(__field_struct(struct v4l2_vp9_mv_probs
, p
)),
221 TP_fast_assign(__entry
->p
= *p
;),
222 TP_printk("\n joint %s\n"
231 __print_array(__entry
->p
.joint
,
232 ARRAY_SIZE(__entry
->p
.joint
),
233 sizeof(__entry
->p
.joint
[0])),
234 __print_array(__entry
->p
.sign
,
235 ARRAY_SIZE(__entry
->p
.sign
),
236 sizeof(__entry
->p
.sign
[0])),
237 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
239 sizeof(__entry
->p
.classes
),
241 __print_array(__entry
->p
.class0_bit
,
242 ARRAY_SIZE(__entry
->p
.class0_bit
),
243 sizeof(__entry
->p
.class0_bit
[0])),
244 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
246 sizeof(__entry
->p
.bits
),
248 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
249 __entry
->p
.class0_fr
,
250 sizeof(__entry
->p
.class0_fr
),
252 __print_hex_dump("", DUMP_PREFIX_NONE
, 32, 1,
254 sizeof(__entry
->p
.fr
),
256 __print_array(__entry
->p
.class0_hp
,
257 ARRAY_SIZE(__entry
->p
.class0_hp
),
258 sizeof(__entry
->p
.class0_hp
[0])),
259 __print_array(__entry
->p
.hp
,
260 ARRAY_SIZE(__entry
->p
.hp
),
261 sizeof(__entry
->p
.hp
[0]))
265 DEFINE_EVENT(v4l2_ctrl_vp9_frame_tmpl
, v4l2_ctrl_vp9_frame
,
266 TP_PROTO(const struct v4l2_ctrl_vp9_frame
*f
),
270 DEFINE_EVENT(v4l2_ctrl_vp9_compressed_hdr_tmpl
, v4l2_ctrl_vp9_compressed_hdr
,
271 TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr
*h
),
275 DEFINE_EVENT(v4l2_ctrl_vp9_compressed_coef_tmpl
, v4l2_ctrl_vp9_compressed_coeff
,
276 TP_PROTO(const struct v4l2_ctrl_vp9_compressed_hdr
*h
),
281 DEFINE_EVENT(v4l2_vp9_mv_probs_tmpl
, v4l2_vp9_mv_probs
,
282 TP_PROTO(const struct v4l2_vp9_mv_probs
*p
),
288 #undef TRACE_INCLUDE_PATH
289 #undef TRACE_INCLUDE_FILE
290 #define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
291 #define TRACE_INCLUDE_FILE visl-trace-vp9
292 #include <trace/define_trace.h>