xref: /linux/drivers/media/test-drivers/visl/visl-trace-fwht.h (revision 6f84981772535e670e4e2df051a672af229b6694)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_VISL_TRACE_FWHT_H_) || defined(TRACE_HEADER_MULTI_READ)
3 #define _VISL_TRACE_FWHT_H_
4 
5 #include <linux/tracepoint.h>
6 #include "visl.h"
7 
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM visl_fwht_controls
10 
11 DECLARE_EVENT_CLASS(v4l2_ctrl_fwht_params_tmpl,
12 	TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
13 	TP_ARGS(p),
14 	TP_STRUCT__entry(
15 			 __field(u64, backward_ref_ts)
16 			 __field(u32, version)
17 			 __field(u32, width)
18 			 __field(u32, height)
19 			 __field(u32, flags)
20 			 __field(u32, colorspace)
21 			 __field(u32, xfer_func)
22 			 __field(u32, ycbcr_enc)
23 			 __field(u32, quantization)
24 			 ),
25 	TP_fast_assign(
26 		       __entry->backward_ref_ts = p->backward_ref_ts;
27 		       __entry->version = p->version;
28 		       __entry->width = p->width;
29 		       __entry->height = p->height;
30 		       __entry->flags = p->flags;
31 		       __entry->colorspace = p->colorspace;
32 		       __entry->xfer_func = p->xfer_func;
33 		       __entry->ycbcr_enc = p->ycbcr_enc;
34 		       __entry->quantization = p->quantization;
35 		       ),
36 	TP_printk("backward_ref_ts %llu version %u width %u height %u flags %s colorspace %u xfer_func %u ycbcr_enc %u quantization %u",
37 		  __entry->backward_ref_ts, __entry->version, __entry->width, __entry->height,
38 		  __print_flags(__entry->flags, "|",
39 		  {V4L2_FWHT_FL_IS_INTERLACED, "IS_INTERLACED"},
40 		  {V4L2_FWHT_FL_IS_BOTTOM_FIRST, "IS_BOTTOM_FIRST"},
41 		  {V4L2_FWHT_FL_IS_ALTERNATE, "IS_ALTERNATE"},
42 		  {V4L2_FWHT_FL_IS_BOTTOM_FIELD, "IS_BOTTOM_FIELD"},
43 		  {V4L2_FWHT_FL_LUMA_IS_UNCOMPRESSED, "LUMA_IS_UNCOMPRESSED"},
44 		  {V4L2_FWHT_FL_CB_IS_UNCOMPRESSED, "CB_IS_UNCOMPRESSED"},
45 		  {V4L2_FWHT_FL_CR_IS_UNCOMPRESSED, "CR_IS_UNCOMPRESSED"},
46 		  {V4L2_FWHT_FL_ALPHA_IS_UNCOMPRESSED, "ALPHA_IS_UNCOMPRESSED"},
47 		  {V4L2_FWHT_FL_I_FRAME, "I_FRAME"},
48 		  {V4L2_FWHT_FL_PIXENC_HSV, "PIXENC_HSV"},
49 		  {V4L2_FWHT_FL_PIXENC_RGB, "PIXENC_RGB"},
50 		  {V4L2_FWHT_FL_PIXENC_YUV, "PIXENC_YUV"}),
51 		  __entry->colorspace, __entry->xfer_func, __entry->ycbcr_enc,
52 		  __entry->quantization)
53 );
54 
55 DEFINE_EVENT(v4l2_ctrl_fwht_params_tmpl, v4l2_ctrl_fwht_params,
56 	TP_PROTO(const struct v4l2_ctrl_fwht_params *p),
57 	TP_ARGS(p)
58 );
59 
60 #endif
61 
62 #undef TRACE_INCLUDE_PATH
63 #undef TRACE_INCLUDE_FILE
64 #define TRACE_INCLUDE_PATH ../../drivers/media/test-drivers/visl
65 #define TRACE_INCLUDE_FILE visl-trace-fwht
66 #include <trace/define_trace.h>
67