1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM coda
5 #if !defined(__CODA_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ)
6 #define __CODA_TRACE_H__
8 #include <linux/tracepoint.h>
9 #include <media/videobuf2-v4l2.h>
13 TRACE_EVENT(coda_bit_run
,
14 TP_PROTO(struct coda_ctx
*ctx
, int cmd
),
25 __entry
->minor
= ctx
->fh
.vdev
->minor
;
26 __entry
->ctx
= ctx
->idx
;
30 TP_printk("minor = %d, ctx = %d, cmd = %d",
31 __entry
->minor
, __entry
->ctx
, __entry
->cmd
)
34 TRACE_EVENT(coda_bit_done
,
35 TP_PROTO(struct coda_ctx
*ctx
),
45 __entry
->minor
= ctx
->fh
.vdev
->minor
;
46 __entry
->ctx
= ctx
->idx
;
49 TP_printk("minor = %d, ctx = %d", __entry
->minor
, __entry
->ctx
)
52 DECLARE_EVENT_CLASS(coda_buf_class
,
53 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
),
64 __entry
->minor
= ctx
->fh
.vdev
->minor
;
65 __entry
->index
= buf
->vb2_buf
.index
;
66 __entry
->ctx
= ctx
->idx
;
69 TP_printk("minor = %d, index = %d, ctx = %d",
70 __entry
->minor
, __entry
->index
, __entry
->ctx
)
73 DEFINE_EVENT(coda_buf_class
, coda_enc_pic_run
,
74 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
),
78 DEFINE_EVENT(coda_buf_class
, coda_enc_pic_done
,
79 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
),
83 DECLARE_EVENT_CLASS(coda_buf_meta_class
,
84 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
,
85 struct coda_buffer_meta
*meta
),
87 TP_ARGS(ctx
, buf
, meta
),
98 __entry
->minor
= ctx
->fh
.vdev
->minor
;
99 __entry
->index
= buf
->vb2_buf
.index
;
100 __entry
->start
= meta
->start
;
101 __entry
->end
= meta
->end
;
102 __entry
->ctx
= ctx
->idx
;
105 TP_printk("minor = %d, index = %d, start = 0x%x, end = 0x%x, ctx = %d",
106 __entry
->minor
, __entry
->index
, __entry
->start
, __entry
->end
,
110 DEFINE_EVENT(coda_buf_meta_class
, coda_bit_queue
,
111 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
,
112 struct coda_buffer_meta
*meta
),
113 TP_ARGS(ctx
, buf
, meta
)
116 DECLARE_EVENT_CLASS(coda_meta_class
,
117 TP_PROTO(struct coda_ctx
*ctx
, struct coda_buffer_meta
*meta
),
129 __entry
->minor
= ctx
->fh
.vdev
->minor
;
130 __entry
->start
= meta
? meta
->start
: 0;
131 __entry
->end
= meta
? meta
->end
: 0;
132 __entry
->ctx
= ctx
->idx
;
135 TP_printk("minor = %d, start = 0x%x, end = 0x%x, ctx = %d",
136 __entry
->minor
, __entry
->start
, __entry
->end
, __entry
->ctx
)
139 DEFINE_EVENT(coda_meta_class
, coda_dec_pic_run
,
140 TP_PROTO(struct coda_ctx
*ctx
, struct coda_buffer_meta
*meta
),
144 DEFINE_EVENT(coda_meta_class
, coda_dec_pic_done
,
145 TP_PROTO(struct coda_ctx
*ctx
, struct coda_buffer_meta
*meta
),
149 DEFINE_EVENT(coda_buf_meta_class
, coda_dec_rot_done
,
150 TP_PROTO(struct coda_ctx
*ctx
, struct vb2_v4l2_buffer
*buf
,
151 struct coda_buffer_meta
*meta
),
152 TP_ARGS(ctx
, buf
, meta
)
155 #endif /* __CODA_TRACE_H__ */
157 #undef TRACE_INCLUDE_PATH
158 #define TRACE_INCLUDE_PATH .
159 #undef TRACE_INCLUDE_FILE
160 #define TRACE_INCLUDE_FILE trace
162 /* This part must be outside protection */
163 #include <trace/define_trace.h>