1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(_MSM_GPU_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
3 #define _MSM_GPU_TRACE_H_
4 
5 #include <linux/tracepoint.h>
6 
7 #undef TRACE_SYSTEM
8 #define TRACE_SYSTEM drm_msm_atomic
9 #define TRACE_INCLUDE_FILE msm_atomic_trace
10 
11 TRACE_EVENT(msm_atomic_commit_tail_start,
12 	    TP_PROTO(bool async, unsigned crtc_mask),
13 	    TP_ARGS(async, crtc_mask),
14 	    TP_STRUCT__entry(
15 		    __field(bool, async)
16 		    __field(u32, crtc_mask)
17 		    ),
18 	    TP_fast_assign(
19 		    __entry->async = async;
20 		    __entry->crtc_mask = crtc_mask;
21 		    ),
22 	    TP_printk("async=%d crtc_mask=%x",
23 		    __entry->async, __entry->crtc_mask)
24 );
25 
26 TRACE_EVENT(msm_atomic_commit_tail_finish,
27 	    TP_PROTO(bool async, unsigned crtc_mask),
28 	    TP_ARGS(async, crtc_mask),
29 	    TP_STRUCT__entry(
30 		    __field(bool, async)
31 		    __field(u32, crtc_mask)
32 		    ),
33 	    TP_fast_assign(
34 		    __entry->async = async;
35 		    __entry->crtc_mask = crtc_mask;
36 		    ),
37 	    TP_printk("async=%d crtc_mask=%x",
38 		    __entry->async, __entry->crtc_mask)
39 );
40 
41 TRACE_EVENT(msm_atomic_async_commit_start,
42 	    TP_PROTO(unsigned crtc_mask),
43 	    TP_ARGS(crtc_mask),
44 	    TP_STRUCT__entry(
45 		    __field(u32, crtc_mask)
46 		    ),
47 	    TP_fast_assign(
48 		    __entry->crtc_mask = crtc_mask;
49 		    ),
50 	    TP_printk("crtc_mask=%x",
51 		    __entry->crtc_mask)
52 );
53 
54 TRACE_EVENT(msm_atomic_async_commit_finish,
55 	    TP_PROTO(unsigned crtc_mask),
56 	    TP_ARGS(crtc_mask),
57 	    TP_STRUCT__entry(
58 		    __field(u32, crtc_mask)
59 		    ),
60 	    TP_fast_assign(
61 		    __entry->crtc_mask = crtc_mask;
62 		    ),
63 	    TP_printk("crtc_mask=%x",
64 		    __entry->crtc_mask)
65 );
66 
67 TRACE_EVENT(msm_atomic_wait_flush_start,
68 	    TP_PROTO(unsigned crtc_mask),
69 	    TP_ARGS(crtc_mask),
70 	    TP_STRUCT__entry(
71 		    __field(u32, crtc_mask)
72 		    ),
73 	    TP_fast_assign(
74 		    __entry->crtc_mask = crtc_mask;
75 		    ),
76 	    TP_printk("crtc_mask=%x",
77 		    __entry->crtc_mask)
78 );
79 
80 TRACE_EVENT(msm_atomic_wait_flush_finish,
81 	    TP_PROTO(unsigned crtc_mask),
82 	    TP_ARGS(crtc_mask),
83 	    TP_STRUCT__entry(
84 		    __field(u32, crtc_mask)
85 		    ),
86 	    TP_fast_assign(
87 		    __entry->crtc_mask = crtc_mask;
88 		    ),
89 	    TP_printk("crtc_mask=%x",
90 		    __entry->crtc_mask)
91 );
92 
93 TRACE_EVENT(msm_atomic_flush_commit,
94 	    TP_PROTO(unsigned crtc_mask),
95 	    TP_ARGS(crtc_mask),
96 	    TP_STRUCT__entry(
97 		    __field(u32, crtc_mask)
98 		    ),
99 	    TP_fast_assign(
100 		    __entry->crtc_mask = crtc_mask;
101 		    ),
102 	    TP_printk("crtc_mask=%x",
103 		    __entry->crtc_mask)
104 );
105 
106 #endif
107 
108 #undef TRACE_INCLUDE_PATH
109 #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/msm
110 #include <trace/define_trace.h>
111