1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(ARMADA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
3 #define ARMADA_TRACE_H
4 
5 #include <linux/tracepoint.h>
6 #include <drm/drmP.h>
7 
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM armada
10 #define TRACE_INCLUDE_FILE armada_trace
11 
12 TRACE_EVENT(armada_drm_irq,
13 	TP_PROTO(struct drm_crtc *crtc, u32 stat),
14 	TP_ARGS(crtc, stat),
15 	TP_STRUCT__entry(
16 		__field(struct drm_crtc *, crtc)
17 		__field(u32, stat)
18 	),
19 	TP_fast_assign(
20 		__entry->crtc = crtc;
21 		__entry->stat = stat;
22 	),
23 	TP_printk("crtc %p stat 0x%08x",
24 		__entry->crtc, __entry->stat)
25 );
26 
27 TRACE_EVENT(armada_ovl_plane_update,
28 	TP_PROTO(struct drm_plane *plane, struct drm_crtc *crtc,
29 		     struct drm_framebuffer *fb,
30 		     int crtc_x, int crtc_y, unsigned crtc_w, unsigned crtc_h,
31 		     uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h),
32 	TP_ARGS(plane, crtc, fb, crtc_x, crtc_y, crtc_w, crtc_h, src_x, src_y, src_w, src_h),
33 	TP_STRUCT__entry(
34 		__field(struct drm_plane *, plane)
35 		__field(struct drm_crtc *, crtc)
36 		__field(struct drm_framebuffer *, fb)
37 	),
38 	TP_fast_assign(
39 		__entry->plane = plane;
40 		__entry->crtc = crtc;
41 		__entry->fb = fb;
42 	),
43 	TP_printk("plane %p crtc %p fb %p",
44 		__entry->plane, __entry->crtc, __entry->fb)
45 );
46 
47 TRACE_EVENT(armada_ovl_plane_work,
48 	TP_PROTO(struct drm_crtc *crtc, struct drm_plane *plane),
49 	TP_ARGS(crtc, plane),
50 	TP_STRUCT__entry(
51 		__field(struct drm_plane *, plane)
52 		__field(struct drm_crtc *, crtc)
53 	),
54 	TP_fast_assign(
55 		__entry->plane = plane;
56 		__entry->crtc = crtc;
57 	),
58 	TP_printk("plane %p crtc %p",
59 		__entry->plane, __entry->crtc)
60 );
61 
62 #endif
63 
64 /* This part must be outside protection */
65 #undef TRACE_INCLUDE_PATH
66 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/armada
67 #include <trace/define_trace.h>
68