blob: daa6fdf4d8ba6c41e2e1422c048cead85f59543c [file] [log] [blame]
Chris Wilson1c5d22f2009-08-25 11:15:50 +01001#if !defined(_I915_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
2#define _I915_TRACE_H_
3
4#include <linux/stringify.h>
5#include <linux/types.h>
6#include <linux/tracepoint.h>
7
8#include <drm/drmP.h>
Chris Wilson05394f32010-11-08 19:18:58 +00009#include "i915_drv.h"
Chris Wilsondb53a302011-02-03 11:57:46 +000010#include "intel_ringbuffer.h"
Chris Wilson1c5d22f2009-08-25 11:15:50 +010011
12#undef TRACE_SYSTEM
13#define TRACE_SYSTEM i915
14#define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)
15#define TRACE_INCLUDE_FILE i915_trace
16
17/* object tracking */
18
19TRACE_EVENT(i915_gem_object_create,
Chris Wilson05394f32010-11-08 19:18:58 +000020 TP_PROTO(struct drm_i915_gem_object *obj),
Chris Wilson1c5d22f2009-08-25 11:15:50 +010021 TP_ARGS(obj),
22
23 TP_STRUCT__entry(
Chris Wilson05394f32010-11-08 19:18:58 +000024 __field(struct drm_i915_gem_object *, obj)
Chris Wilson1c5d22f2009-08-25 11:15:50 +010025 __field(u32, size)
26 ),
27
28 TP_fast_assign(
29 __entry->obj = obj;
Chris Wilson05394f32010-11-08 19:18:58 +000030 __entry->size = obj->base.size;
Chris Wilson1c5d22f2009-08-25 11:15:50 +010031 ),
32
33 TP_printk("obj=%p, size=%u", __entry->obj, __entry->size)
34);
35
Ben Widawsky07fe0b12013-07-31 17:00:10 -070036TRACE_EVENT(i915_vma_bind,
37 TP_PROTO(struct i915_vma *vma, bool mappable),
38 TP_ARGS(vma, mappable),
Chris Wilson1c5d22f2009-08-25 11:15:50 +010039
40 TP_STRUCT__entry(
Chris Wilson05394f32010-11-08 19:18:58 +000041 __field(struct drm_i915_gem_object *, obj)
Ben Widawsky07fe0b12013-07-31 17:00:10 -070042 __field(struct i915_address_space *, vm)
Chris Wilsondb53a302011-02-03 11:57:46 +000043 __field(u32, offset)
44 __field(u32, size)
Daniel Vetterec57d262010-09-30 23:42:15 +020045 __field(bool, mappable)
Chris Wilson1c5d22f2009-08-25 11:15:50 +010046 ),
47
48 TP_fast_assign(
Ben Widawsky07fe0b12013-07-31 17:00:10 -070049 __entry->obj = vma->obj;
50 __entry->vm = vma->vm;
51 __entry->offset = vma->node.start;
52 __entry->size = vma->node.size;
Daniel Vetterec57d262010-09-30 23:42:15 +020053 __entry->mappable = mappable;
Chris Wilson1c5d22f2009-08-25 11:15:50 +010054 ),
55
Ben Widawsky07fe0b12013-07-31 17:00:10 -070056 TP_printk("obj=%p, offset=%08x size=%x%s vm=%p",
Chris Wilsondb53a302011-02-03 11:57:46 +000057 __entry->obj, __entry->offset, __entry->size,
Ben Widawsky07fe0b12013-07-31 17:00:10 -070058 __entry->mappable ? ", mappable" : "",
59 __entry->vm)
Chris Wilson1c5d22f2009-08-25 11:15:50 +010060);
61
Ben Widawsky07fe0b12013-07-31 17:00:10 -070062TRACE_EVENT(i915_vma_unbind,
63 TP_PROTO(struct i915_vma *vma),
64 TP_ARGS(vma),
Chris Wilsondb53a302011-02-03 11:57:46 +000065
66 TP_STRUCT__entry(
67 __field(struct drm_i915_gem_object *, obj)
Ben Widawsky07fe0b12013-07-31 17:00:10 -070068 __field(struct i915_address_space *, vm)
Chris Wilsondb53a302011-02-03 11:57:46 +000069 __field(u32, offset)
70 __field(u32, size)
71 ),
72
73 TP_fast_assign(
Ben Widawsky07fe0b12013-07-31 17:00:10 -070074 __entry->obj = vma->obj;
75 __entry->vm = vma->vm;
76 __entry->offset = vma->node.start;
77 __entry->size = vma->node.size;
Chris Wilsondb53a302011-02-03 11:57:46 +000078 ),
79
Ben Widawsky07fe0b12013-07-31 17:00:10 -070080 TP_printk("obj=%p, offset=%08x size=%x vm=%p",
81 __entry->obj, __entry->offset, __entry->size, __entry->vm)
Chris Wilsondb53a302011-02-03 11:57:46 +000082);
83
Chris Wilson1c5d22f2009-08-25 11:15:50 +010084TRACE_EVENT(i915_gem_object_change_domain,
Chris Wilsondb53a302011-02-03 11:57:46 +000085 TP_PROTO(struct drm_i915_gem_object *obj, u32 old_read, u32 old_write),
86 TP_ARGS(obj, old_read, old_write),
Chris Wilson1c5d22f2009-08-25 11:15:50 +010087
88 TP_STRUCT__entry(
Chris Wilson05394f32010-11-08 19:18:58 +000089 __field(struct drm_i915_gem_object *, obj)
Chris Wilson1c5d22f2009-08-25 11:15:50 +010090 __field(u32, read_domains)
91 __field(u32, write_domain)
92 ),
93
94 TP_fast_assign(
95 __entry->obj = obj;
Chris Wilsondb53a302011-02-03 11:57:46 +000096 __entry->read_domains = obj->base.read_domains | (old_read << 16);
97 __entry->write_domain = obj->base.write_domain | (old_write << 16);
Chris Wilson1c5d22f2009-08-25 11:15:50 +010098 ),
99
Chris Wilsondb53a302011-02-03 11:57:46 +0000100 TP_printk("obj=%p, read=%02x=>%02x, write=%02x=>%02x",
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100101 __entry->obj,
Chris Wilsondb53a302011-02-03 11:57:46 +0000102 __entry->read_domains >> 16,
103 __entry->read_domains & 0xffff,
104 __entry->write_domain >> 16,
105 __entry->write_domain & 0xffff)
106);
107
108TRACE_EVENT(i915_gem_object_pwrite,
109 TP_PROTO(struct drm_i915_gem_object *obj, u32 offset, u32 len),
110 TP_ARGS(obj, offset, len),
111
112 TP_STRUCT__entry(
113 __field(struct drm_i915_gem_object *, obj)
114 __field(u32, offset)
115 __field(u32, len)
116 ),
117
118 TP_fast_assign(
119 __entry->obj = obj;
120 __entry->offset = offset;
121 __entry->len = len;
122 ),
123
124 TP_printk("obj=%p, offset=%u, len=%u",
125 __entry->obj, __entry->offset, __entry->len)
126);
127
128TRACE_EVENT(i915_gem_object_pread,
129 TP_PROTO(struct drm_i915_gem_object *obj, u32 offset, u32 len),
130 TP_ARGS(obj, offset, len),
131
132 TP_STRUCT__entry(
133 __field(struct drm_i915_gem_object *, obj)
134 __field(u32, offset)
135 __field(u32, len)
136 ),
137
138 TP_fast_assign(
139 __entry->obj = obj;
140 __entry->offset = offset;
141 __entry->len = len;
142 ),
143
144 TP_printk("obj=%p, offset=%u, len=%u",
145 __entry->obj, __entry->offset, __entry->len)
146);
147
148TRACE_EVENT(i915_gem_object_fault,
149 TP_PROTO(struct drm_i915_gem_object *obj, u32 index, bool gtt, bool write),
150 TP_ARGS(obj, index, gtt, write),
151
152 TP_STRUCT__entry(
153 __field(struct drm_i915_gem_object *, obj)
154 __field(u32, index)
155 __field(bool, gtt)
156 __field(bool, write)
157 ),
158
159 TP_fast_assign(
160 __entry->obj = obj;
161 __entry->index = index;
162 __entry->gtt = gtt;
163 __entry->write = write;
164 ),
165
166 TP_printk("obj=%p, %s index=%u %s",
167 __entry->obj,
168 __entry->gtt ? "GTT" : "CPU",
169 __entry->index,
170 __entry->write ? ", writable" : "")
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100171);
172
Li Zefan903cf202010-03-11 16:41:45 +0800173DECLARE_EVENT_CLASS(i915_gem_object,
Chris Wilson05394f32010-11-08 19:18:58 +0000174 TP_PROTO(struct drm_i915_gem_object *obj),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100175 TP_ARGS(obj),
176
177 TP_STRUCT__entry(
Chris Wilson05394f32010-11-08 19:18:58 +0000178 __field(struct drm_i915_gem_object *, obj)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100179 ),
180
181 TP_fast_assign(
182 __entry->obj = obj;
183 ),
184
185 TP_printk("obj=%p", __entry->obj)
186);
187
Li Zefanf41275e2010-05-24 16:25:44 +0800188DEFINE_EVENT(i915_gem_object, i915_gem_object_clflush,
Chris Wilsondb53a302011-02-03 11:57:46 +0000189 TP_PROTO(struct drm_i915_gem_object *obj),
190 TP_ARGS(obj)
Li Zefan903cf202010-03-11 16:41:45 +0800191);
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100192
Li Zefan903cf202010-03-11 16:41:45 +0800193DEFINE_EVENT(i915_gem_object, i915_gem_object_destroy,
Chris Wilson05394f32010-11-08 19:18:58 +0000194 TP_PROTO(struct drm_i915_gem_object *obj),
Li Zefan903cf202010-03-11 16:41:45 +0800195 TP_ARGS(obj)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100196);
197
Chris Wilsondb53a302011-02-03 11:57:46 +0000198TRACE_EVENT(i915_gem_evict,
199 TP_PROTO(struct drm_device *dev, u32 size, u32 align, bool mappable),
200 TP_ARGS(dev, size, align, mappable),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100201
202 TP_STRUCT__entry(
Chris Wilson4f49be52009-09-24 00:23:33 +0100203 __field(u32, dev)
Chris Wilsondb53a302011-02-03 11:57:46 +0000204 __field(u32, size)
205 __field(u32, align)
206 __field(bool, mappable)
207 ),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100208
209 TP_fast_assign(
Chris Wilson4f49be52009-09-24 00:23:33 +0100210 __entry->dev = dev->primary->index;
Chris Wilsondb53a302011-02-03 11:57:46 +0000211 __entry->size = size;
212 __entry->align = align;
213 __entry->mappable = mappable;
214 ),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100215
Chris Wilsondb53a302011-02-03 11:57:46 +0000216 TP_printk("dev=%d, size=%d, align=%d %s",
217 __entry->dev, __entry->size, __entry->align,
218 __entry->mappable ? ", mappable" : "")
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100219);
220
Chris Wilsondb53a302011-02-03 11:57:46 +0000221TRACE_EVENT(i915_gem_evict_everything,
Chris Wilson6c085a72012-08-20 11:40:46 +0200222 TP_PROTO(struct drm_device *dev),
223 TP_ARGS(dev),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100224
225 TP_STRUCT__entry(
Chris Wilson4f49be52009-09-24 00:23:33 +0100226 __field(u32, dev)
Chris Wilsondb53a302011-02-03 11:57:46 +0000227 ),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100228
229 TP_fast_assign(
Chris Wilson4f49be52009-09-24 00:23:33 +0100230 __entry->dev = dev->primary->index;
Chris Wilsondb53a302011-02-03 11:57:46 +0000231 ),
232
Chris Wilson6c085a72012-08-20 11:40:46 +0200233 TP_printk("dev=%d", __entry->dev)
Chris Wilsondb53a302011-02-03 11:57:46 +0000234);
235
Ben Widawskybcccff82013-09-24 09:57:56 -0700236TRACE_EVENT(i915_gem_evict_vm,
237 TP_PROTO(struct i915_address_space *vm),
238 TP_ARGS(vm),
239
240 TP_STRUCT__entry(
241 __field(struct i915_address_space *, vm)
242 ),
243
244 TP_fast_assign(
245 __entry->vm = vm;
246 ),
247
248 TP_printk("dev=%d, vm=%p", __entry->vm->dev->primary->index, __entry->vm)
249);
250
Chris Wilsondb53a302011-02-03 11:57:46 +0000251TRACE_EVENT(i915_gem_ring_dispatch,
Chris Wilsond7d4eed2012-10-17 12:09:54 +0100252 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno, u32 flags),
253 TP_ARGS(ring, seqno, flags),
Chris Wilsondb53a302011-02-03 11:57:46 +0000254
255 TP_STRUCT__entry(
256 __field(u32, dev)
257 __field(u32, ring)
258 __field(u32, seqno)
Chris Wilsond7d4eed2012-10-17 12:09:54 +0100259 __field(u32, flags)
Chris Wilsondb53a302011-02-03 11:57:46 +0000260 ),
261
262 TP_fast_assign(
263 __entry->dev = ring->dev->primary->index;
264 __entry->ring = ring->id;
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100265 __entry->seqno = seqno;
Chris Wilsond7d4eed2012-10-17 12:09:54 +0100266 __entry->flags = flags;
Chris Wilsondb53a302011-02-03 11:57:46 +0000267 i915_trace_irq_get(ring, seqno);
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100268 ),
269
Chris Wilsond7d4eed2012-10-17 12:09:54 +0100270 TP_printk("dev=%u, ring=%u, seqno=%u, flags=%x",
271 __entry->dev, __entry->ring, __entry->seqno, __entry->flags)
Chris Wilsondb53a302011-02-03 11:57:46 +0000272);
273
274TRACE_EVENT(i915_gem_ring_flush,
275 TP_PROTO(struct intel_ring_buffer *ring, u32 invalidate, u32 flush),
276 TP_ARGS(ring, invalidate, flush),
277
278 TP_STRUCT__entry(
279 __field(u32, dev)
280 __field(u32, ring)
281 __field(u32, invalidate)
282 __field(u32, flush)
283 ),
284
285 TP_fast_assign(
286 __entry->dev = ring->dev->primary->index;
287 __entry->ring = ring->id;
288 __entry->invalidate = invalidate;
289 __entry->flush = flush;
290 ),
291
292 TP_printk("dev=%u, ring=%x, invalidate=%04x, flush=%04x",
293 __entry->dev, __entry->ring,
294 __entry->invalidate, __entry->flush)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100295);
296
Li Zefan903cf202010-03-11 16:41:45 +0800297DECLARE_EVENT_CLASS(i915_gem_request,
Chris Wilsondb53a302011-02-03 11:57:46 +0000298 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
299 TP_ARGS(ring, seqno),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100300
301 TP_STRUCT__entry(
Chris Wilson4f49be52009-09-24 00:23:33 +0100302 __field(u32, dev)
Chris Wilsondb53a302011-02-03 11:57:46 +0000303 __field(u32, ring)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100304 __field(u32, seqno)
305 ),
306
307 TP_fast_assign(
Chris Wilsondb53a302011-02-03 11:57:46 +0000308 __entry->dev = ring->dev->primary->index;
309 __entry->ring = ring->id;
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100310 __entry->seqno = seqno;
311 ),
312
Chris Wilsondb53a302011-02-03 11:57:46 +0000313 TP_printk("dev=%u, ring=%u, seqno=%u",
314 __entry->dev, __entry->ring, __entry->seqno)
315);
316
317DEFINE_EVENT(i915_gem_request, i915_gem_request_add,
318 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
319 TP_ARGS(ring, seqno)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100320);
321
Chris Wilson814e9b52013-09-23 17:33:19 -0300322TRACE_EVENT(i915_gem_request_complete,
323 TP_PROTO(struct intel_ring_buffer *ring),
324 TP_ARGS(ring),
325
326 TP_STRUCT__entry(
327 __field(u32, dev)
328 __field(u32, ring)
329 __field(u32, seqno)
330 ),
331
332 TP_fast_assign(
333 __entry->dev = ring->dev->primary->index;
334 __entry->ring = ring->id;
335 __entry->seqno = ring->get_seqno(ring, false);
336 ),
337
338 TP_printk("dev=%u, ring=%u, seqno=%u",
339 __entry->dev, __entry->ring, __entry->seqno)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100340);
341
Li Zefan903cf202010-03-11 16:41:45 +0800342DEFINE_EVENT(i915_gem_request, i915_gem_request_retire,
Chris Wilsondb53a302011-02-03 11:57:46 +0000343 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
344 TP_ARGS(ring, seqno)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100345);
346
Ben Widawskyf3fd3762012-05-24 15:03:09 -0700347TRACE_EVENT(i915_gem_request_wait_begin,
Chris Wilsondb53a302011-02-03 11:57:46 +0000348 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
Ben Widawskyf3fd3762012-05-24 15:03:09 -0700349 TP_ARGS(ring, seqno),
350
351 TP_STRUCT__entry(
352 __field(u32, dev)
353 __field(u32, ring)
354 __field(u32, seqno)
355 __field(bool, blocking)
356 ),
357
358 /* NB: the blocking information is racy since mutex_is_locked
359 * doesn't check that the current thread holds the lock. The only
360 * other option would be to pass the boolean information of whether
361 * or not the class was blocking down through the stack which is
362 * less desirable.
363 */
364 TP_fast_assign(
365 __entry->dev = ring->dev->primary->index;
366 __entry->ring = ring->id;
367 __entry->seqno = seqno;
368 __entry->blocking = mutex_is_locked(&ring->dev->struct_mutex);
369 ),
370
371 TP_printk("dev=%u, ring=%u, seqno=%u, blocking=%s",
372 __entry->dev, __entry->ring, __entry->seqno,
373 __entry->blocking ? "yes (NB)" : "no")
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100374);
375
Li Zefan903cf202010-03-11 16:41:45 +0800376DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end,
Chris Wilsondb53a302011-02-03 11:57:46 +0000377 TP_PROTO(struct intel_ring_buffer *ring, u32 seqno),
378 TP_ARGS(ring, seqno)
Li Zefan903cf202010-03-11 16:41:45 +0800379);
380
381DECLARE_EVENT_CLASS(i915_ring,
Chris Wilsondb53a302011-02-03 11:57:46 +0000382 TP_PROTO(struct intel_ring_buffer *ring),
383 TP_ARGS(ring),
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100384
385 TP_STRUCT__entry(
Chris Wilson4f49be52009-09-24 00:23:33 +0100386 __field(u32, dev)
Chris Wilsondb53a302011-02-03 11:57:46 +0000387 __field(u32, ring)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100388 ),
389
390 TP_fast_assign(
Chris Wilsondb53a302011-02-03 11:57:46 +0000391 __entry->dev = ring->dev->primary->index;
392 __entry->ring = ring->id;
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100393 ),
394
Chris Wilsondb53a302011-02-03 11:57:46 +0000395 TP_printk("dev=%u, ring=%u", __entry->dev, __entry->ring)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100396);
397
Li Zefan903cf202010-03-11 16:41:45 +0800398DEFINE_EVENT(i915_ring, i915_ring_wait_begin,
Chris Wilsondb53a302011-02-03 11:57:46 +0000399 TP_PROTO(struct intel_ring_buffer *ring),
400 TP_ARGS(ring)
Li Zefan903cf202010-03-11 16:41:45 +0800401);
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100402
Li Zefan903cf202010-03-11 16:41:45 +0800403DEFINE_EVENT(i915_ring, i915_ring_wait_end,
Chris Wilsondb53a302011-02-03 11:57:46 +0000404 TP_PROTO(struct intel_ring_buffer *ring),
405 TP_ARGS(ring)
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100406);
407
Jesse Barnese5510fa2010-07-01 16:48:37 -0700408TRACE_EVENT(i915_flip_request,
Chris Wilson05394f32010-11-08 19:18:58 +0000409 TP_PROTO(int plane, struct drm_i915_gem_object *obj),
Jesse Barnese5510fa2010-07-01 16:48:37 -0700410
411 TP_ARGS(plane, obj),
412
413 TP_STRUCT__entry(
414 __field(int, plane)
Chris Wilson05394f32010-11-08 19:18:58 +0000415 __field(struct drm_i915_gem_object *, obj)
Jesse Barnese5510fa2010-07-01 16:48:37 -0700416 ),
417
418 TP_fast_assign(
419 __entry->plane = plane;
420 __entry->obj = obj;
421 ),
422
423 TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
424);
425
426TRACE_EVENT(i915_flip_complete,
Chris Wilson05394f32010-11-08 19:18:58 +0000427 TP_PROTO(int plane, struct drm_i915_gem_object *obj),
Jesse Barnese5510fa2010-07-01 16:48:37 -0700428
429 TP_ARGS(plane, obj),
430
431 TP_STRUCT__entry(
432 __field(int, plane)
Chris Wilson05394f32010-11-08 19:18:58 +0000433 __field(struct drm_i915_gem_object *, obj)
Jesse Barnese5510fa2010-07-01 16:48:37 -0700434 ),
435
436 TP_fast_assign(
437 __entry->plane = plane;
438 __entry->obj = obj;
439 ),
440
441 TP_printk("plane=%d, obj=%p", __entry->plane, __entry->obj)
442);
443
Chris Wilsoned71f1b2013-07-19 20:36:56 +0100444TRACE_EVENT_CONDITION(i915_reg_rw,
445 TP_PROTO(bool write, u32 reg, u64 val, int len, bool trace),
Yuanhan Liuba4f01a2010-11-08 17:09:41 +0800446
Chris Wilsoned71f1b2013-07-19 20:36:56 +0100447 TP_ARGS(write, reg, val, len, trace),
448
449 TP_CONDITION(trace),
Yuanhan Liuba4f01a2010-11-08 17:09:41 +0800450
Akshay Joshi0206e352011-08-16 15:34:10 -0400451 TP_STRUCT__entry(
452 __field(u64, val)
453 __field(u32, reg)
454 __field(u16, write)
455 __field(u16, len)
456 ),
Yuanhan Liuba4f01a2010-11-08 17:09:41 +0800457
Akshay Joshi0206e352011-08-16 15:34:10 -0400458 TP_fast_assign(
459 __entry->val = (u64)val;
460 __entry->reg = reg;
461 __entry->write = write;
462 __entry->len = len;
463 ),
Yuanhan Liuba4f01a2010-11-08 17:09:41 +0800464
Akshay Joshi0206e352011-08-16 15:34:10 -0400465 TP_printk("%s reg=0x%x, len=%d, val=(0x%x, 0x%x)",
466 __entry->write ? "write" : "read",
467 __entry->reg, __entry->len,
468 (u32)(__entry->val & 0xffffffff),
469 (u32)(__entry->val >> 32))
Yuanhan Liuba4f01a2010-11-08 17:09:41 +0800470);
471
Daniel Vetterbe2cde92012-08-30 13:26:48 +0200472TRACE_EVENT(intel_gpu_freq_change,
473 TP_PROTO(u32 freq),
474 TP_ARGS(freq),
475
476 TP_STRUCT__entry(
477 __field(u32, freq)
478 ),
479
480 TP_fast_assign(
481 __entry->freq = freq;
482 ),
483
484 TP_printk("new_freq=%u", __entry->freq)
485);
486
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100487#endif /* _I915_TRACE_H_ */
488
489/* This part must be outside protection */
490#undef TRACE_INCLUDE_PATH
Peter Cliftona7c54272010-05-03 13:24:41 +0100491#define TRACE_INCLUDE_PATH .
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100492#include <trace/define_trace.h>