1 // SPDX-License-Identifier: GPL-2.0+
2 /* Copyright (C) 2015-2018 Broadcom */
4 #if !defined(_V3D_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/stringify.h>
8 #include <linux/types.h>
9 #include <linux/tracepoint.h>
12 #define TRACE_SYSTEM v3d
13 #define TRACE_INCLUDE_FILE v3d_trace
15 TRACE_EVENT(v3d_submit_cl_ioctl
,
16 TP_PROTO(struct drm_device
*dev
, u32 ct1qba
, u32 ct1qea
),
17 TP_ARGS(dev
, ct1qba
, ct1qea
),
26 __entry
->dev
= dev
->primary
->index
;
27 __entry
->ct1qba
= ct1qba
;
28 __entry
->ct1qea
= ct1qea
;
31 TP_printk("dev=%u, RCL 0x%08x..0x%08x",
37 TRACE_EVENT(v3d_submit_cl
,
38 TP_PROTO(struct drm_device
*dev
, bool is_render
,
40 u32 ctnqba
, u32 ctnqea
),
41 TP_ARGS(dev
, is_render
, seqno
, ctnqba
, ctnqea
),
45 __field(bool, is_render
)
52 __entry
->dev
= dev
->primary
->index
;
53 __entry
->is_render
= is_render
;
54 __entry
->seqno
= seqno
;
55 __entry
->ctnqba
= ctnqba
;
56 __entry
->ctnqea
= ctnqea
;
59 TP_printk("dev=%u, %s, seqno=%llu, 0x%08x..0x%08x",
61 __entry
->is_render
? "RCL" : "BCL",
67 TRACE_EVENT(v3d_bcl_irq
,
68 TP_PROTO(struct drm_device
*dev
,
78 __entry
->dev
= dev
->primary
->index
;
79 __entry
->seqno
= seqno
;
82 TP_printk("dev=%u, seqno=%llu",
87 TRACE_EVENT(v3d_rcl_irq
,
88 TP_PROTO(struct drm_device
*dev
,
98 __entry
->dev
= dev
->primary
->index
;
99 __entry
->seqno
= seqno
;
102 TP_printk("dev=%u, seqno=%llu",
107 TRACE_EVENT(v3d_tfu_irq
,
108 TP_PROTO(struct drm_device
*dev
,
118 __entry
->dev
= dev
->primary
->index
;
119 __entry
->seqno
= seqno
;
122 TP_printk("dev=%u, seqno=%llu",
127 TRACE_EVENT(v3d_csd_irq
,
128 TP_PROTO(struct drm_device
*dev
,
138 __entry
->dev
= dev
->primary
->index
;
139 __entry
->seqno
= seqno
;
142 TP_printk("dev=%u, seqno=%llu",
147 TRACE_EVENT(v3d_submit_tfu_ioctl
,
148 TP_PROTO(struct drm_device
*dev
, u32 iia
),
157 __entry
->dev
= dev
->primary
->index
;
161 TP_printk("dev=%u, IIA 0x%08x",
166 TRACE_EVENT(v3d_submit_tfu
,
167 TP_PROTO(struct drm_device
*dev
,
177 __entry
->dev
= dev
->primary
->index
;
178 __entry
->seqno
= seqno
;
181 TP_printk("dev=%u, seqno=%llu",
186 TRACE_EVENT(v3d_submit_csd_ioctl
,
187 TP_PROTO(struct drm_device
*dev
, u32 cfg5
, u32 cfg6
),
188 TP_ARGS(dev
, cfg5
, cfg6
),
197 __entry
->dev
= dev
->primary
->index
;
198 __entry
->cfg5
= cfg5
;
199 __entry
->cfg6
= cfg6
;
202 TP_printk("dev=%u, CFG5 0x%08x, CFG6 0x%08x",
208 TRACE_EVENT(v3d_submit_csd
,
209 TP_PROTO(struct drm_device
*dev
,
219 __entry
->dev
= dev
->primary
->index
;
220 __entry
->seqno
= seqno
;
223 TP_printk("dev=%u, seqno=%llu",
228 TRACE_EVENT(v3d_cache_clean_begin
,
229 TP_PROTO(struct drm_device
*dev
),
237 __entry
->dev
= dev
->primary
->index
;
244 TRACE_EVENT(v3d_cache_clean_end
,
245 TP_PROTO(struct drm_device
*dev
),
253 __entry
->dev
= dev
->primary
->index
;
260 TRACE_EVENT(v3d_reset_begin
,
261 TP_PROTO(struct drm_device
*dev
),
269 __entry
->dev
= dev
->primary
->index
;
276 TRACE_EVENT(v3d_reset_end
,
277 TP_PROTO(struct drm_device
*dev
),
285 __entry
->dev
= dev
->primary
->index
;
292 #endif /* _V3D_TRACE_H_ */
294 /* This part must be outside protection */
295 #undef TRACE_INCLUDE_PATH
296 #define TRACE_INCLUDE_PATH .
297 #include <trace/define_trace.h>