aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2013-03-22 10:34:03 -0400
committerThierry Reding <thierry.reding@avionic-design.de>2013-04-22 06:32:43 -0400
commit6579324a41cc414009a601738b70a53d6376325c (patch)
tree61b3491351217d07ff75851c6d989bf02b213383 /include/trace
parent7ede0b0bf3e2595d40d6195b6fe4c4dcef438830 (diff)
gpu: host1x: Add channel support
Add support for host1x client modules, and host1x channels to submit work to the clients. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/host1x.h192
1 files changed, 192 insertions, 0 deletions
diff --git a/include/trace/events/host1x.h b/include/trace/events/host1x.h
index 4bd2b0253d27..94db6a2c3540 100644
--- a/include/trace/events/host1x.h
+++ b/include/trace/events/host1x.h
@@ -37,6 +37,171 @@ DECLARE_EVENT_CLASS(host1x,
37 TP_printk("name=%s", __entry->name) 37 TP_printk("name=%s", __entry->name)
38); 38);
39 39
40DEFINE_EVENT(host1x, host1x_channel_open,
41 TP_PROTO(const char *name),
42 TP_ARGS(name)
43);
44
45DEFINE_EVENT(host1x, host1x_channel_release,
46 TP_PROTO(const char *name),
47 TP_ARGS(name)
48);
49
50DEFINE_EVENT(host1x, host1x_cdma_begin,
51 TP_PROTO(const char *name),
52 TP_ARGS(name)
53);
54
55DEFINE_EVENT(host1x, host1x_cdma_end,
56 TP_PROTO(const char *name),
57 TP_ARGS(name)
58);
59
60TRACE_EVENT(host1x_cdma_push,
61 TP_PROTO(const char *name, u32 op1, u32 op2),
62
63 TP_ARGS(name, op1, op2),
64
65 TP_STRUCT__entry(
66 __field(const char *, name)
67 __field(u32, op1)
68 __field(u32, op2)
69 ),
70
71 TP_fast_assign(
72 __entry->name = name;
73 __entry->op1 = op1;
74 __entry->op2 = op2;
75 ),
76
77 TP_printk("name=%s, op1=%08x, op2=%08x",
78 __entry->name, __entry->op1, __entry->op2)
79);
80
81TRACE_EVENT(host1x_cdma_push_gather,
82 TP_PROTO(const char *name, u32 mem_id,
83 u32 words, u32 offset, void *cmdbuf),
84
85 TP_ARGS(name, mem_id, words, offset, cmdbuf),
86
87 TP_STRUCT__entry(
88 __field(const char *, name)
89 __field(u32, mem_id)
90 __field(u32, words)
91 __field(u32, offset)
92 __field(bool, cmdbuf)
93 __dynamic_array(u32, cmdbuf, words)
94 ),
95
96 TP_fast_assign(
97 if (cmdbuf) {
98 memcpy(__get_dynamic_array(cmdbuf), cmdbuf+offset,
99 words * sizeof(u32));
100 }
101 __entry->cmdbuf = cmdbuf;
102 __entry->name = name;
103 __entry->mem_id = mem_id;
104 __entry->words = words;
105 __entry->offset = offset;
106 ),
107
108 TP_printk("name=%s, mem_id=%08x, words=%u, offset=%d, contents=[%s]",
109 __entry->name, __entry->mem_id,
110 __entry->words, __entry->offset,
111 __print_hex(__get_dynamic_array(cmdbuf),
112 __entry->cmdbuf ? __entry->words * 4 : 0))
113);
114
115TRACE_EVENT(host1x_channel_submit,
116 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 waitchks,
117 u32 syncpt_id, u32 syncpt_incrs),
118
119 TP_ARGS(name, cmdbufs, relocs, waitchks, syncpt_id, syncpt_incrs),
120
121 TP_STRUCT__entry(
122 __field(const char *, name)
123 __field(u32, cmdbufs)
124 __field(u32, relocs)
125 __field(u32, waitchks)
126 __field(u32, syncpt_id)
127 __field(u32, syncpt_incrs)
128 ),
129
130 TP_fast_assign(
131 __entry->name = name;
132 __entry->cmdbufs = cmdbufs;
133 __entry->relocs = relocs;
134 __entry->waitchks = waitchks;
135 __entry->syncpt_id = syncpt_id;
136 __entry->syncpt_incrs = syncpt_incrs;
137 ),
138
139 TP_printk("name=%s, cmdbufs=%u, relocs=%u, waitchks=%d,"
140 "syncpt_id=%u, syncpt_incrs=%u",
141 __entry->name, __entry->cmdbufs, __entry->relocs, __entry->waitchks,
142 __entry->syncpt_id, __entry->syncpt_incrs)
143);
144
145TRACE_EVENT(host1x_channel_submitted,
146 TP_PROTO(const char *name, u32 syncpt_base, u32 syncpt_max),
147
148 TP_ARGS(name, syncpt_base, syncpt_max),
149
150 TP_STRUCT__entry(
151 __field(const char *, name)
152 __field(u32, syncpt_base)
153 __field(u32, syncpt_max)
154 ),
155
156 TP_fast_assign(
157 __entry->name = name;
158 __entry->syncpt_base = syncpt_base;
159 __entry->syncpt_max = syncpt_max;
160 ),
161
162 TP_printk("name=%s, syncpt_base=%d, syncpt_max=%d",
163 __entry->name, __entry->syncpt_base, __entry->syncpt_max)
164);
165
166TRACE_EVENT(host1x_channel_submit_complete,
167 TP_PROTO(const char *name, int count, u32 thresh),
168
169 TP_ARGS(name, count, thresh),
170
171 TP_STRUCT__entry(
172 __field(const char *, name)
173 __field(int, count)
174 __field(u32, thresh)
175 ),
176
177 TP_fast_assign(
178 __entry->name = name;
179 __entry->count = count;
180 __entry->thresh = thresh;
181 ),
182
183 TP_printk("name=%s, count=%d, thresh=%d",
184 __entry->name, __entry->count, __entry->thresh)
185);
186
187TRACE_EVENT(host1x_wait_cdma,
188 TP_PROTO(const char *name, u32 eventid),
189
190 TP_ARGS(name, eventid),
191
192 TP_STRUCT__entry(
193 __field(const char *, name)
194 __field(u32, eventid)
195 ),
196
197 TP_fast_assign(
198 __entry->name = name;
199 __entry->eventid = eventid;
200 ),
201
202 TP_printk("name=%s, event=%d", __entry->name, __entry->eventid)
203);
204
40TRACE_EVENT(host1x_syncpt_load_min, 205TRACE_EVENT(host1x_syncpt_load_min,
41 TP_PROTO(u32 id, u32 val), 206 TP_PROTO(u32 id, u32 val),
42 207
@@ -55,6 +220,33 @@ TRACE_EVENT(host1x_syncpt_load_min,
55 TP_printk("id=%d, val=%d", __entry->id, __entry->val) 220 TP_printk("id=%d, val=%d", __entry->id, __entry->val)
56); 221);
57 222
223TRACE_EVENT(host1x_syncpt_wait_check,
224 TP_PROTO(void *mem_id, u32 offset, u32 syncpt_id, u32 thresh, u32 min),
225
226 TP_ARGS(mem_id, offset, syncpt_id, thresh, min),
227
228 TP_STRUCT__entry(
229 __field(void *, mem_id)
230 __field(u32, offset)
231 __field(u32, syncpt_id)
232 __field(u32, thresh)
233 __field(u32, min)
234 ),
235
236 TP_fast_assign(
237 __entry->mem_id = mem_id;
238 __entry->offset = offset;
239 __entry->syncpt_id = syncpt_id;
240 __entry->thresh = thresh;
241 __entry->min = min;
242 ),
243
244 TP_printk("mem_id=%p, offset=%05x, id=%d, thresh=%d, current=%d",
245 __entry->mem_id, __entry->offset,
246 __entry->syncpt_id, __entry->thresh,
247 __entry->min)
248);
249
58#endif /* _TRACE_HOST1X_H */ 250#endif /* _TRACE_HOST1X_H */
59 251
60/* This part must be outside protection */ 252/* This part must be outside protection */