diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_trace.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_trace.h | 101 |
1 files changed, 88 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h index 23c26f1f8b37..f5aa0067755a 100644 --- a/drivers/gpu/drm/i915/i915_trace.h +++ b/drivers/gpu/drm/i915/i915_trace.h | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <drm/drmP.h> | 8 | #include <drm/drmP.h> |
9 | #include "i915_drv.h" | 9 | #include "i915_drv.h" |
10 | #include "intel_drv.h" | ||
10 | #include "intel_ringbuffer.h" | 11 | #include "intel_ringbuffer.h" |
11 | 12 | ||
12 | #undef TRACE_SYSTEM | 13 | #undef TRACE_SYSTEM |
@@ -14,6 +15,80 @@ | |||
14 | #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM) | 15 | #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM) |
15 | #define TRACE_INCLUDE_FILE i915_trace | 16 | #define TRACE_INCLUDE_FILE i915_trace |
16 | 17 | ||
18 | /* pipe updates */ | ||
19 | |||
20 | TRACE_EVENT(i915_pipe_update_start, | ||
21 | TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max), | ||
22 | TP_ARGS(crtc, min, max), | ||
23 | |||
24 | TP_STRUCT__entry( | ||
25 | __field(enum pipe, pipe) | ||
26 | __field(u32, frame) | ||
27 | __field(u32, scanline) | ||
28 | __field(u32, min) | ||
29 | __field(u32, max) | ||
30 | ), | ||
31 | |||
32 | TP_fast_assign( | ||
33 | __entry->pipe = crtc->pipe; | ||
34 | __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, | ||
35 | crtc->pipe); | ||
36 | __entry->scanline = intel_get_crtc_scanline(crtc); | ||
37 | __entry->min = min; | ||
38 | __entry->max = max; | ||
39 | ), | ||
40 | |||
41 | TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", | ||
42 | pipe_name(__entry->pipe), __entry->frame, | ||
43 | __entry->scanline, __entry->min, __entry->max) | ||
44 | ); | ||
45 | |||
46 | TRACE_EVENT(i915_pipe_update_vblank_evaded, | ||
47 | TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max, u32 frame), | ||
48 | TP_ARGS(crtc, min, max, frame), | ||
49 | |||
50 | TP_STRUCT__entry( | ||
51 | __field(enum pipe, pipe) | ||
52 | __field(u32, frame) | ||
53 | __field(u32, scanline) | ||
54 | __field(u32, min) | ||
55 | __field(u32, max) | ||
56 | ), | ||
57 | |||
58 | TP_fast_assign( | ||
59 | __entry->pipe = crtc->pipe; | ||
60 | __entry->frame = frame; | ||
61 | __entry->scanline = intel_get_crtc_scanline(crtc); | ||
62 | __entry->min = min; | ||
63 | __entry->max = max; | ||
64 | ), | ||
65 | |||
66 | TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", | ||
67 | pipe_name(__entry->pipe), __entry->frame, | ||
68 | __entry->scanline, __entry->min, __entry->max) | ||
69 | ); | ||
70 | |||
71 | TRACE_EVENT(i915_pipe_update_end, | ||
72 | TP_PROTO(struct intel_crtc *crtc, u32 frame), | ||
73 | TP_ARGS(crtc, frame), | ||
74 | |||
75 | TP_STRUCT__entry( | ||
76 | __field(enum pipe, pipe) | ||
77 | __field(u32, frame) | ||
78 | __field(u32, scanline) | ||
79 | ), | ||
80 | |||
81 | TP_fast_assign( | ||
82 | __entry->pipe = crtc->pipe; | ||
83 | __entry->frame = frame; | ||
84 | __entry->scanline = intel_get_crtc_scanline(crtc); | ||
85 | ), | ||
86 | |||
87 | TP_printk("pipe %c, frame=%u, scanline=%u", | ||
88 | pipe_name(__entry->pipe), __entry->frame, | ||
89 | __entry->scanline) | ||
90 | ); | ||
91 | |||
17 | /* object tracking */ | 92 | /* object tracking */ |
18 | 93 | ||
19 | TRACE_EVENT(i915_gem_object_create, | 94 | TRACE_EVENT(i915_gem_object_create, |
@@ -251,8 +326,8 @@ TRACE_EVENT(i915_gem_evict_vm, | |||
251 | ); | 326 | ); |
252 | 327 | ||
253 | TRACE_EVENT(i915_gem_ring_sync_to, | 328 | TRACE_EVENT(i915_gem_ring_sync_to, |
254 | TP_PROTO(struct intel_ring_buffer *from, | 329 | TP_PROTO(struct intel_engine_cs *from, |
255 | struct intel_ring_buffer *to, | 330 | struct intel_engine_cs *to, |
256 | u32 seqno), | 331 | u32 seqno), |
257 | TP_ARGS(from, to, seqno), | 332 | TP_ARGS(from, to, seqno), |
258 | 333 | ||
@@ -277,7 +352,7 @@ TRACE_EVENT(i915_gem_ring_sync_to, | |||
277 | ); | 352 | ); |
278 | 353 | ||
279 | TRACE_EVENT(i915_gem_ring_dispatch, | 354 | TRACE_EVENT(i915_gem_ring_dispatch, |
280 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno, u32 flags), | 355 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno, u32 flags), |
281 | TP_ARGS(ring, seqno, flags), | 356 | TP_ARGS(ring, seqno, flags), |
282 | 357 | ||
283 | TP_STRUCT__entry( | 358 | TP_STRUCT__entry( |
@@ -300,7 +375,7 @@ TRACE_EVENT(i915_gem_ring_dispatch, | |||
300 | ); | 375 | ); |
301 | 376 | ||
302 | TRACE_EVENT(i915_gem_ring_flush, | 377 | TRACE_EVENT(i915_gem_ring_flush, |
303 | TP_PROTO(struct intel_ring_buffer *ring, u32 invalidate, u32 flush), | 378 | TP_PROTO(struct intel_engine_cs *ring, u32 invalidate, u32 flush), |
304 | TP_ARGS(ring, invalidate, flush), | 379 | TP_ARGS(ring, invalidate, flush), |
305 | 380 | ||
306 | TP_STRUCT__entry( | 381 | TP_STRUCT__entry( |
@@ -323,7 +398,7 @@ TRACE_EVENT(i915_gem_ring_flush, | |||
323 | ); | 398 | ); |
324 | 399 | ||
325 | DECLARE_EVENT_CLASS(i915_gem_request, | 400 | DECLARE_EVENT_CLASS(i915_gem_request, |
326 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno), | 401 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), |
327 | TP_ARGS(ring, seqno), | 402 | TP_ARGS(ring, seqno), |
328 | 403 | ||
329 | TP_STRUCT__entry( | 404 | TP_STRUCT__entry( |
@@ -343,12 +418,12 @@ DECLARE_EVENT_CLASS(i915_gem_request, | |||
343 | ); | 418 | ); |
344 | 419 | ||
345 | DEFINE_EVENT(i915_gem_request, i915_gem_request_add, | 420 | DEFINE_EVENT(i915_gem_request, i915_gem_request_add, |
346 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno), | 421 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), |
347 | TP_ARGS(ring, seqno) | 422 | TP_ARGS(ring, seqno) |
348 | ); | 423 | ); |
349 | 424 | ||
350 | TRACE_EVENT(i915_gem_request_complete, | 425 | TRACE_EVENT(i915_gem_request_complete, |
351 | TP_PROTO(struct intel_ring_buffer *ring), | 426 | TP_PROTO(struct intel_engine_cs *ring), |
352 | TP_ARGS(ring), | 427 | TP_ARGS(ring), |
353 | 428 | ||
354 | TP_STRUCT__entry( | 429 | TP_STRUCT__entry( |
@@ -368,12 +443,12 @@ TRACE_EVENT(i915_gem_request_complete, | |||
368 | ); | 443 | ); |
369 | 444 | ||
370 | DEFINE_EVENT(i915_gem_request, i915_gem_request_retire, | 445 | DEFINE_EVENT(i915_gem_request, i915_gem_request_retire, |
371 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno), | 446 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), |
372 | TP_ARGS(ring, seqno) | 447 | TP_ARGS(ring, seqno) |
373 | ); | 448 | ); |
374 | 449 | ||
375 | TRACE_EVENT(i915_gem_request_wait_begin, | 450 | TRACE_EVENT(i915_gem_request_wait_begin, |
376 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno), | 451 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), |
377 | TP_ARGS(ring, seqno), | 452 | TP_ARGS(ring, seqno), |
378 | 453 | ||
379 | TP_STRUCT__entry( | 454 | TP_STRUCT__entry( |
@@ -402,12 +477,12 @@ TRACE_EVENT(i915_gem_request_wait_begin, | |||
402 | ); | 477 | ); |
403 | 478 | ||
404 | DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end, | 479 | DEFINE_EVENT(i915_gem_request, i915_gem_request_wait_end, |
405 | TP_PROTO(struct intel_ring_buffer *ring, u32 seqno), | 480 | TP_PROTO(struct intel_engine_cs *ring, u32 seqno), |
406 | TP_ARGS(ring, seqno) | 481 | TP_ARGS(ring, seqno) |
407 | ); | 482 | ); |
408 | 483 | ||
409 | DECLARE_EVENT_CLASS(i915_ring, | 484 | DECLARE_EVENT_CLASS(i915_ring, |
410 | TP_PROTO(struct intel_ring_buffer *ring), | 485 | TP_PROTO(struct intel_engine_cs *ring), |
411 | TP_ARGS(ring), | 486 | TP_ARGS(ring), |
412 | 487 | ||
413 | TP_STRUCT__entry( | 488 | TP_STRUCT__entry( |
@@ -424,12 +499,12 @@ DECLARE_EVENT_CLASS(i915_ring, | |||
424 | ); | 499 | ); |
425 | 500 | ||
426 | DEFINE_EVENT(i915_ring, i915_ring_wait_begin, | 501 | DEFINE_EVENT(i915_ring, i915_ring_wait_begin, |
427 | TP_PROTO(struct intel_ring_buffer *ring), | 502 | TP_PROTO(struct intel_engine_cs *ring), |
428 | TP_ARGS(ring) | 503 | TP_ARGS(ring) |
429 | ); | 504 | ); |
430 | 505 | ||
431 | DEFINE_EVENT(i915_ring, i915_ring_wait_end, | 506 | DEFINE_EVENT(i915_ring, i915_ring_wait_end, |
432 | TP_PROTO(struct intel_ring_buffer *ring), | 507 | TP_PROTO(struct intel_engine_cs *ring), |
433 | TP_ARGS(ring) | 508 | TP_ARGS(ring) |
434 | ); | 509 | ); |
435 | 510 | ||