Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #undef TRACE_SYSTEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define TRACE_SYSTEM v4l2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #define _TRACE_V4L2_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/tracepoint.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <media/videobuf2-v4l2.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) /* Enums require being exported to userspace, for user tool parsing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #undef EM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #undef EMe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #define EM(a, b)	TRACE_DEFINE_ENUM(a);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #define EMe(a, b)	TRACE_DEFINE_ENUM(a);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define show_type(type)							\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) 	__print_symbolic(type, SHOW_TYPE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #define SHOW_TYPE							\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 	EM( V4L2_BUF_TYPE_VIDEO_CAPTURE,	"VIDEO_CAPTURE" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 	EM( V4L2_BUF_TYPE_VIDEO_OUTPUT,		"VIDEO_OUTPUT" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) 	EM( V4L2_BUF_TYPE_VIDEO_OVERLAY,	"VIDEO_OVERLAY" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	EM( V4L2_BUF_TYPE_VBI_CAPTURE,		"VBI_CAPTURE" )		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	EM( V4L2_BUF_TYPE_VBI_OUTPUT,		"VBI_OUTPUT" )		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	EM( V4L2_BUF_TYPE_SLICED_VBI_CAPTURE,   "SLICED_VBI_CAPTURE" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	EM( V4L2_BUF_TYPE_SLICED_VBI_OUTPUT,    "SLICED_VBI_OUTPUT" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" ) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 	EM( V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" ) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,  "VIDEO_OUTPUT_MPLANE" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	EM( V4L2_BUF_TYPE_SDR_CAPTURE,          "SDR_CAPTURE" )		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	EM( V4L2_BUF_TYPE_SDR_OUTPUT,           "SDR_OUTPUT" )		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	EM( V4L2_BUF_TYPE_META_CAPTURE,		"META_CAPTURE" )	\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	EMe(V4L2_BUF_TYPE_PRIVATE,		"PRIVATE" )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) SHOW_TYPE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) #define show_field(field)						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	__print_symbolic(field, SHOW_FIELD)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #define SHOW_FIELD							\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	EM( V4L2_FIELD_ANY,		"ANY" )				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	EM( V4L2_FIELD_NONE,		"NONE" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 	EM( V4L2_FIELD_TOP,		"TOP" )				\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	EM( V4L2_FIELD_BOTTOM,		"BOTTOM" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	EM( V4L2_FIELD_INTERLACED,	"INTERLACED" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	EM( V4L2_FIELD_SEQ_TB,		"SEQ_TB" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	EM( V4L2_FIELD_SEQ_BT,		"SEQ_BT" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	EM( V4L2_FIELD_ALTERNATE,	"ALTERNATE" )			\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	EM( V4L2_FIELD_INTERLACED_TB,	"INTERLACED_TB" )		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	EMe( V4L2_FIELD_INTERLACED_BT,	"INTERLACED_BT" )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) SHOW_FIELD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)  * Now redefine the EM() and EMe() macros to map the enums to the strings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)  * that will be printed in the output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) #undef EM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) #undef EMe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) #define EM(a, b)	{a, b},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) #define EMe(a, b)	{a, b}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) /* V4L2_TC_TYPE_* are macros, not defines, they do not need processing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) #define show_timecode_type(type)					\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	__print_symbolic(type,						\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 		{ V4L2_TC_TYPE_24FPS,		"24FPS" },		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 		{ V4L2_TC_TYPE_25FPS,		"25FPS" },		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		{ V4L2_TC_TYPE_30FPS,		"30FPS" },		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		{ V4L2_TC_TYPE_50FPS,		"50FPS" },		\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 		{ V4L2_TC_TYPE_60FPS,		"60FPS" })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) #define show_flags(flags)						      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	__print_flags(flags, "|",					      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 		{ V4L2_BUF_FLAG_MAPPED,		     "MAPPED" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		{ V4L2_BUF_FLAG_QUEUED,		     "QUEUED" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		{ V4L2_BUF_FLAG_DONE,		     "DONE" },		      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 		{ V4L2_BUF_FLAG_KEYFRAME,	     "KEYFRAME" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 		{ V4L2_BUF_FLAG_PFRAME,		     "PFRAME" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		{ V4L2_BUF_FLAG_BFRAME,		     "BFRAME" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		{ V4L2_BUF_FLAG_ERROR,		     "ERROR" },		      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		{ V4L2_BUF_FLAG_TIMECODE,	     "TIMECODE" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		{ V4L2_BUF_FLAG_PREPARED,	     "PREPARED" },	      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		{ V4L2_BUF_FLAG_NO_CACHE_INVALIDATE, "NO_CACHE_INVALIDATE" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		{ V4L2_BUF_FLAG_NO_CACHE_CLEAN,	     "NO_CACHE_CLEAN" },      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		{ V4L2_BUF_FLAG_TIMESTAMP_MASK,	     "TIMESTAMP_MASK" },      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		{ V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN,   "TIMESTAMP_UNKNOWN" },   \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 		{ V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC, "TIMESTAMP_MONOTONIC" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		{ V4L2_BUF_FLAG_TIMESTAMP_COPY,	     "TIMESTAMP_COPY" },      \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		{ V4L2_BUF_FLAG_LAST,                "LAST" })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) #define show_timecode_flags(flags)					  \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	__print_flags(flags, "|",					  \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		{ V4L2_TC_FLAG_DROPFRAME,       "DROPFRAME" },		  \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 		{ V4L2_TC_FLAG_COLORFRAME,      "COLORFRAME" },		  \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		{ V4L2_TC_USERBITS_USERDEFINED,	"USERBITS_USERDEFINED" }, \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 		{ V4L2_TC_USERBITS_8BITCHARS,	"USERBITS_8BITCHARS" })
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) DECLARE_EVENT_CLASS(v4l2_event_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	TP_PROTO(int minor, struct v4l2_buffer *buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	TP_ARGS(minor, buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		__field(int, minor)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		__field(u32, index)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		__field(u32, type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		__field(u32, bytesused)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 		__field(u32, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 		__field(u32, field)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 		__field(s64, timestamp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 		__field(u32, timecode_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 		__field(u32, timecode_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 		__field(u8, timecode_frames)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 		__field(u8, timecode_seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 		__field(u8, timecode_minutes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		__field(u8, timecode_hours)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		__field(u8, timecode_userbits0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 		__field(u8, timecode_userbits1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 		__field(u8, timecode_userbits2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 		__field(u8, timecode_userbits3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 		__field(u32, sequence)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 		__entry->minor = minor;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 		__entry->index = buf->index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 		__entry->type = buf->type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		__entry->bytesused = buf->bytesused;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 		__entry->flags = buf->flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 		__entry->field = buf->field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		__entry->timestamp = v4l2_buffer_get_timestamp(buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		__entry->timecode_type = buf->timecode.type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 		__entry->timecode_flags = buf->timecode.flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 		__entry->timecode_frames = buf->timecode.frames;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 		__entry->timecode_seconds = buf->timecode.seconds;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 		__entry->timecode_minutes = buf->timecode.minutes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		__entry->timecode_hours = buf->timecode.hours;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		__entry->timecode_userbits0 = buf->timecode.userbits[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 		__entry->timecode_userbits1 = buf->timecode.userbits[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		__entry->timecode_userbits2 = buf->timecode.userbits[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 		__entry->timecode_userbits3 = buf->timecode.userbits[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		__entry->sequence = buf->sequence;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	TP_printk("minor = %d, index = %u, type = %s, bytesused = %u, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		  "flags = %s, field = %s, timestamp = %llu, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		  "timecode = { type = %s, flags = %s, frames = %u, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		  "seconds = %u, minutes = %u, hours = %u, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		  "userbits = { %u %u %u %u } }, sequence = %u", __entry->minor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 		  __entry->index, show_type(__entry->type),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 		  __entry->bytesused,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 		  show_flags(__entry->flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 		  show_field(__entry->field),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		  __entry->timestamp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		  show_timecode_type(__entry->timecode_type),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		  show_timecode_flags(__entry->timecode_flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 		  __entry->timecode_frames,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		  __entry->timecode_seconds,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		  __entry->timecode_minutes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		  __entry->timecode_hours,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 		  __entry->timecode_userbits0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 		  __entry->timecode_userbits1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		  __entry->timecode_userbits2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		  __entry->timecode_userbits3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		  __entry->sequence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) DEFINE_EVENT(v4l2_event_class, v4l2_dqbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	TP_PROTO(int minor, struct v4l2_buffer *buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	TP_ARGS(minor, buf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) DEFINE_EVENT(v4l2_event_class, v4l2_qbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	TP_PROTO(int minor, struct v4l2_buffer *buf),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	TP_ARGS(minor, buf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) DECLARE_EVENT_CLASS(vb2_v4l2_event_class,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	TP_ARGS(q, vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	TP_STRUCT__entry(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		__field(int, minor)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		__field(u32, flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		__field(u32, field)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		__field(u64, timestamp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		__field(u32, timecode_type)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		__field(u32, timecode_flags)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 		__field(u8, timecode_frames)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 		__field(u8, timecode_seconds)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 		__field(u8, timecode_minutes)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 		__field(u8, timecode_hours)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		__field(u8, timecode_userbits0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		__field(u8, timecode_userbits1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 		__field(u8, timecode_userbits2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 		__field(u8, timecode_userbits3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 		__field(u32, sequence)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	TP_fast_assign(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 		struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		struct v4l2_fh *owner = q->owner;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 		__entry->minor = owner ? owner->vdev->minor : -1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 		__entry->flags = vbuf->flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 		__entry->field = vbuf->field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 		__entry->timestamp = vb->timestamp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 		__entry->timecode_type = vbuf->timecode.type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 		__entry->timecode_flags = vbuf->timecode.flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		__entry->timecode_frames = vbuf->timecode.frames;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 		__entry->timecode_seconds = vbuf->timecode.seconds;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 		__entry->timecode_minutes = vbuf->timecode.minutes;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 		__entry->timecode_hours = vbuf->timecode.hours;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 		__entry->timecode_userbits0 = vbuf->timecode.userbits[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 		__entry->timecode_userbits1 = vbuf->timecode.userbits[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		__entry->timecode_userbits2 = vbuf->timecode.userbits[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		__entry->timecode_userbits3 = vbuf->timecode.userbits[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 		__entry->sequence = vbuf->sequence;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	TP_printk("minor=%d flags = %s, field = %s, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 		  "timestamp = %llu, timecode = { type = %s, flags = %s, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 		  "frames = %u, seconds = %u, minutes = %u, hours = %u, "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 		  "userbits = { %u %u %u %u } }, sequence = %u", __entry->minor,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 		  show_flags(__entry->flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 		  show_field(__entry->field),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		  __entry->timestamp,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		  show_timecode_type(__entry->timecode_type),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 		  show_timecode_flags(__entry->timecode_flags),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 		  __entry->timecode_frames,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 		  __entry->timecode_seconds,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 		  __entry->timecode_minutes,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 		  __entry->timecode_hours,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 		  __entry->timecode_userbits0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 		  __entry->timecode_userbits1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 		  __entry->timecode_userbits2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) 		  __entry->timecode_userbits3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) 		  __entry->sequence
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) 	)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) )
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) DEFINE_EVENT(vb2_v4l2_event_class, vb2_v4l2_buf_done,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 	TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 	TP_ARGS(q, vb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) DEFINE_EVENT(vb2_v4l2_event_class, vb2_v4l2_buf_queue,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) 	TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) 	TP_ARGS(q, vb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) DEFINE_EVENT(vb2_v4l2_event_class, vb2_v4l2_dqbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 	TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 	TP_ARGS(q, vb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) DEFINE_EVENT(vb2_v4l2_event_class, vb2_v4l2_qbuf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 	TP_PROTO(struct vb2_queue *q, struct vb2_buffer *vb),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) 	TP_ARGS(q, vb)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) #endif /* if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) /* This part must be outside protection */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) #include <trace/define_trace.h>