mtd: rawnand: fsl_elbc: Implement RNDOUT command
[linux/fpc-iii.git] / include / trace / events / host1x.h
blob3d340b6f1ea3817adfd293aad0ed0a96a6b2481b
1 /*
2 * include/trace/events/host1x.h
4 * host1x event logging to ftrace.
6 * Copyright (c) 2010-2013, NVIDIA Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #undef TRACE_SYSTEM
24 #define TRACE_SYSTEM host1x
26 #if !defined(_TRACE_HOST1X_H) || defined(TRACE_HEADER_MULTI_READ)
27 #define _TRACE_HOST1X_H
29 #include <linux/ktime.h>
30 #include <linux/tracepoint.h>
32 struct host1x_bo;
34 DECLARE_EVENT_CLASS(host1x,
35 TP_PROTO(const char *name),
36 TP_ARGS(name),
37 TP_STRUCT__entry(__field(const char *, name)),
38 TP_fast_assign(__entry->name = name;),
39 TP_printk("name=%s", __entry->name)
42 DEFINE_EVENT(host1x, host1x_channel_open,
43 TP_PROTO(const char *name),
44 TP_ARGS(name)
47 DEFINE_EVENT(host1x, host1x_channel_release,
48 TP_PROTO(const char *name),
49 TP_ARGS(name)
52 DEFINE_EVENT(host1x, host1x_cdma_begin,
53 TP_PROTO(const char *name),
54 TP_ARGS(name)
57 DEFINE_EVENT(host1x, host1x_cdma_end,
58 TP_PROTO(const char *name),
59 TP_ARGS(name)
62 TRACE_EVENT(host1x_cdma_push,
63 TP_PROTO(const char *name, u32 op1, u32 op2),
65 TP_ARGS(name, op1, op2),
67 TP_STRUCT__entry(
68 __field(const char *, name)
69 __field(u32, op1)
70 __field(u32, op2)
73 TP_fast_assign(
74 __entry->name = name;
75 __entry->op1 = op1;
76 __entry->op2 = op2;
79 TP_printk("name=%s, op1=%08x, op2=%08x",
80 __entry->name, __entry->op1, __entry->op2)
83 TRACE_EVENT(host1x_cdma_push_wide,
84 TP_PROTO(const char *name, u32 op1, u32 op2, u32 op3, u32 op4),
86 TP_ARGS(name, op1, op2, op3, op4),
88 TP_STRUCT__entry(
89 __field(const char *, name)
90 __field(u32, op1)
91 __field(u32, op2)
92 __field(u32, op3)
93 __field(u32, op4)
96 TP_fast_assign(
97 __entry->name = name;
98 __entry->op1 = op1;
99 __entry->op2 = op2;
100 __entry->op3 = op3;
101 __entry->op4 = op4;
104 TP_printk("name=%s, op1=%08x, op2=%08x, op3=%08x op4=%08x",
105 __entry->name, __entry->op1, __entry->op2, __entry->op3,
106 __entry->op4)
109 TRACE_EVENT(host1x_cdma_push_gather,
110 TP_PROTO(const char *name, struct host1x_bo *bo,
111 u32 words, u32 offset, void *cmdbuf),
113 TP_ARGS(name, bo, words, offset, cmdbuf),
115 TP_STRUCT__entry(
116 __field(const char *, name)
117 __field(struct host1x_bo *, bo)
118 __field(u32, words)
119 __field(u32, offset)
120 __field(bool, cmdbuf)
121 __dynamic_array(u32, cmdbuf, words)
124 TP_fast_assign(
125 if (cmdbuf) {
126 memcpy(__get_dynamic_array(cmdbuf), cmdbuf+offset,
127 words * sizeof(u32));
129 __entry->cmdbuf = cmdbuf;
130 __entry->name = name;
131 __entry->bo = bo;
132 __entry->words = words;
133 __entry->offset = offset;
136 TP_printk("name=%s, bo=%p, words=%u, offset=%d, contents=[%s]",
137 __entry->name, __entry->bo,
138 __entry->words, __entry->offset,
139 __print_hex(__get_dynamic_array(cmdbuf),
140 __entry->cmdbuf ? __entry->words * 4 : 0))
143 TRACE_EVENT(host1x_channel_submit,
144 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 syncpt_id,
145 u32 syncpt_incrs),
147 TP_ARGS(name, cmdbufs, relocs, syncpt_id, syncpt_incrs),
149 TP_STRUCT__entry(
150 __field(const char *, name)
151 __field(u32, cmdbufs)
152 __field(u32, relocs)
153 __field(u32, syncpt_id)
154 __field(u32, syncpt_incrs)
157 TP_fast_assign(
158 __entry->name = name;
159 __entry->cmdbufs = cmdbufs;
160 __entry->relocs = relocs;
161 __entry->syncpt_id = syncpt_id;
162 __entry->syncpt_incrs = syncpt_incrs;
165 TP_printk("name=%s, cmdbufs=%u, relocs=%u, syncpt_id=%u, "
166 "syncpt_incrs=%u",
167 __entry->name, __entry->cmdbufs, __entry->relocs,
168 __entry->syncpt_id, __entry->syncpt_incrs)
171 TRACE_EVENT(host1x_channel_submitted,
172 TP_PROTO(const char *name, u32 syncpt_base, u32 syncpt_max),
174 TP_ARGS(name, syncpt_base, syncpt_max),
176 TP_STRUCT__entry(
177 __field(const char *, name)
178 __field(u32, syncpt_base)
179 __field(u32, syncpt_max)
182 TP_fast_assign(
183 __entry->name = name;
184 __entry->syncpt_base = syncpt_base;
185 __entry->syncpt_max = syncpt_max;
188 TP_printk("name=%s, syncpt_base=%d, syncpt_max=%d",
189 __entry->name, __entry->syncpt_base, __entry->syncpt_max)
192 TRACE_EVENT(host1x_channel_submit_complete,
193 TP_PROTO(const char *name, int count, u32 thresh),
195 TP_ARGS(name, count, thresh),
197 TP_STRUCT__entry(
198 __field(const char *, name)
199 __field(int, count)
200 __field(u32, thresh)
203 TP_fast_assign(
204 __entry->name = name;
205 __entry->count = count;
206 __entry->thresh = thresh;
209 TP_printk("name=%s, count=%d, thresh=%d",
210 __entry->name, __entry->count, __entry->thresh)
213 TRACE_EVENT(host1x_wait_cdma,
214 TP_PROTO(const char *name, u32 eventid),
216 TP_ARGS(name, eventid),
218 TP_STRUCT__entry(
219 __field(const char *, name)
220 __field(u32, eventid)
223 TP_fast_assign(
224 __entry->name = name;
225 __entry->eventid = eventid;
228 TP_printk("name=%s, event=%d", __entry->name, __entry->eventid)
231 TRACE_EVENT(host1x_syncpt_load_min,
232 TP_PROTO(u32 id, u32 val),
234 TP_ARGS(id, val),
236 TP_STRUCT__entry(
237 __field(u32, id)
238 __field(u32, val)
241 TP_fast_assign(
242 __entry->id = id;
243 __entry->val = val;
246 TP_printk("id=%d, val=%d", __entry->id, __entry->val)
249 TRACE_EVENT(host1x_syncpt_wait_check,
250 TP_PROTO(struct host1x_bo *bo, u32 offset, u32 syncpt_id, u32 thresh,
251 u32 min),
253 TP_ARGS(bo, offset, syncpt_id, thresh, min),
255 TP_STRUCT__entry(
256 __field(struct host1x_bo *, bo)
257 __field(u32, offset)
258 __field(u32, syncpt_id)
259 __field(u32, thresh)
260 __field(u32, min)
263 TP_fast_assign(
264 __entry->bo = bo;
265 __entry->offset = offset;
266 __entry->syncpt_id = syncpt_id;
267 __entry->thresh = thresh;
268 __entry->min = min;
271 TP_printk("bo=%p, offset=%05x, id=%d, thresh=%d, current=%d",
272 __entry->bo, __entry->offset,
273 __entry->syncpt_id, __entry->thresh,
274 __entry->min)
277 #endif /* _TRACE_HOST1X_H */
279 /* This part must be outside protection */
280 #include <trace/define_trace.h>