.. | .. |
---|
2 | 2 | #if !defined(_I915_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ) |
---|
3 | 3 | #define _I915_TRACE_H_ |
---|
4 | 4 | |
---|
5 | | -#ifdef CONFIG_PREEMPT_RT_BASE |
---|
| 5 | +#ifdef CONFIG_PREEMPT_RT |
---|
6 | 6 | #define NOTRACE |
---|
7 | 7 | #endif |
---|
8 | 8 | |
---|
.. | .. |
---|
10 | 10 | #include <linux/types.h> |
---|
11 | 11 | #include <linux/tracepoint.h> |
---|
12 | 12 | |
---|
13 | | -#include <drm/drmP.h> |
---|
| 13 | +#include <drm/drm_drv.h> |
---|
| 14 | + |
---|
| 15 | +#include "display/intel_display_types.h" |
---|
| 16 | +#include "gt/intel_engine.h" |
---|
| 17 | + |
---|
14 | 18 | #include "i915_drv.h" |
---|
15 | | -#include "intel_drv.h" |
---|
16 | | -#include "intel_ringbuffer.h" |
---|
| 19 | +#include "i915_irq.h" |
---|
17 | 20 | |
---|
18 | 21 | #undef TRACE_SYSTEM |
---|
19 | 22 | #define TRACE_SYSTEM i915 |
---|
20 | 23 | #define TRACE_INCLUDE_FILE i915_trace |
---|
21 | 24 | |
---|
22 | 25 | /* watermark/fifo updates */ |
---|
| 26 | + |
---|
| 27 | +TRACE_EVENT(intel_pipe_enable, |
---|
| 28 | + TP_PROTO(struct intel_crtc *crtc), |
---|
| 29 | + TP_ARGS(crtc), |
---|
| 30 | + |
---|
| 31 | + TP_STRUCT__entry( |
---|
| 32 | + __array(u32, frame, 3) |
---|
| 33 | + __array(u32, scanline, 3) |
---|
| 34 | + __field(enum pipe, pipe) |
---|
| 35 | + ), |
---|
| 36 | + TP_fast_assign( |
---|
| 37 | + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); |
---|
| 38 | + struct intel_crtc *it__; |
---|
| 39 | + for_each_intel_crtc(&dev_priv->drm, it__) { |
---|
| 40 | + __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); |
---|
| 41 | + __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); |
---|
| 42 | + } |
---|
| 43 | + __entry->pipe = crtc->pipe; |
---|
| 44 | + ), |
---|
| 45 | + |
---|
| 46 | + TP_printk("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", |
---|
| 47 | + pipe_name(__entry->pipe), |
---|
| 48 | + __entry->frame[PIPE_A], __entry->scanline[PIPE_A], |
---|
| 49 | + __entry->frame[PIPE_B], __entry->scanline[PIPE_B], |
---|
| 50 | + __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) |
---|
| 51 | +); |
---|
| 52 | + |
---|
| 53 | +TRACE_EVENT(intel_pipe_disable, |
---|
| 54 | + TP_PROTO(struct intel_crtc *crtc), |
---|
| 55 | + TP_ARGS(crtc), |
---|
| 56 | + |
---|
| 57 | + TP_STRUCT__entry( |
---|
| 58 | + __array(u32, frame, 3) |
---|
| 59 | + __array(u32, scanline, 3) |
---|
| 60 | + __field(enum pipe, pipe) |
---|
| 61 | + ), |
---|
| 62 | + |
---|
| 63 | + TP_fast_assign( |
---|
| 64 | + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); |
---|
| 65 | + struct intel_crtc *it__; |
---|
| 66 | + for_each_intel_crtc(&dev_priv->drm, it__) { |
---|
| 67 | + __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); |
---|
| 68 | + __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); |
---|
| 69 | + } |
---|
| 70 | + __entry->pipe = crtc->pipe; |
---|
| 71 | + ), |
---|
| 72 | + |
---|
| 73 | + TP_printk("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", |
---|
| 74 | + pipe_name(__entry->pipe), |
---|
| 75 | + __entry->frame[PIPE_A], __entry->scanline[PIPE_A], |
---|
| 76 | + __entry->frame[PIPE_B], __entry->scanline[PIPE_B], |
---|
| 77 | + __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) |
---|
| 78 | +); |
---|
| 79 | + |
---|
| 80 | +TRACE_EVENT(intel_pipe_crc, |
---|
| 81 | + TP_PROTO(struct intel_crtc *crtc, const u32 *crcs), |
---|
| 82 | + TP_ARGS(crtc, crcs), |
---|
| 83 | + |
---|
| 84 | + TP_STRUCT__entry( |
---|
| 85 | + __field(enum pipe, pipe) |
---|
| 86 | + __field(u32, frame) |
---|
| 87 | + __field(u32, scanline) |
---|
| 88 | + __array(u32, crcs, 5) |
---|
| 89 | + ), |
---|
| 90 | + |
---|
| 91 | + TP_fast_assign( |
---|
| 92 | + __entry->pipe = crtc->pipe; |
---|
| 93 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 94 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
| 95 | + memcpy(__entry->crcs, crcs, sizeof(__entry->crcs)); |
---|
| 96 | + ), |
---|
| 97 | + |
---|
| 98 | + TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x", |
---|
| 99 | + pipe_name(__entry->pipe), __entry->frame, __entry->scanline, |
---|
| 100 | + __entry->crcs[0], __entry->crcs[1], __entry->crcs[2], |
---|
| 101 | + __entry->crcs[3], __entry->crcs[4]) |
---|
| 102 | +); |
---|
23 | 103 | |
---|
24 | 104 | TRACE_EVENT(intel_cpu_fifo_underrun, |
---|
25 | 105 | TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe), |
---|
.. | .. |
---|
32 | 112 | ), |
---|
33 | 113 | |
---|
34 | 114 | TP_fast_assign( |
---|
| 115 | + struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); |
---|
35 | 116 | __entry->pipe = pipe; |
---|
36 | | - __entry->frame = dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe); |
---|
37 | | - __entry->scanline = intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe)); |
---|
| 117 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 118 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
38 | 119 | ), |
---|
39 | 120 | |
---|
40 | 121 | TP_printk("pipe %c, frame=%u, scanline=%u", |
---|
.. | .. |
---|
54 | 135 | |
---|
55 | 136 | TP_fast_assign( |
---|
56 | 137 | enum pipe pipe = pch_transcoder; |
---|
| 138 | + struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); |
---|
57 | 139 | __entry->pipe = pipe; |
---|
58 | | - __entry->frame = dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe); |
---|
59 | | - __entry->scanline = intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe)); |
---|
| 140 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 141 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
60 | 142 | ), |
---|
61 | 143 | |
---|
62 | 144 | TP_printk("pch transcoder %c, frame=%u, scanline=%u", |
---|
.. | .. |
---|
76 | 158 | ), |
---|
77 | 159 | |
---|
78 | 160 | TP_fast_assign( |
---|
79 | | - enum pipe pipe; |
---|
80 | | - for_each_pipe(dev_priv, pipe) { |
---|
81 | | - __entry->frame[pipe] = |
---|
82 | | - dev_priv->drm.driver->get_vblank_counter(&dev_priv->drm, pipe); |
---|
83 | | - __entry->scanline[pipe] = |
---|
84 | | - intel_get_crtc_scanline(intel_get_crtc_for_pipe(dev_priv, pipe)); |
---|
| 161 | + struct intel_crtc *crtc; |
---|
| 162 | + for_each_intel_crtc(&dev_priv->drm, crtc) { |
---|
| 163 | + __entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc); |
---|
| 164 | + __entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc); |
---|
85 | 165 | } |
---|
86 | 166 | __entry->old = old; |
---|
87 | 167 | __entry->new = new; |
---|
.. | .. |
---|
118 | 198 | |
---|
119 | 199 | TP_fast_assign( |
---|
120 | 200 | __entry->pipe = crtc->pipe; |
---|
121 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
122 | | - crtc->pipe); |
---|
| 201 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
123 | 202 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
124 | 203 | __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; |
---|
125 | 204 | __entry->sprite = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; |
---|
.. | .. |
---|
163 | 242 | |
---|
164 | 243 | TP_fast_assign( |
---|
165 | 244 | __entry->pipe = crtc->pipe; |
---|
166 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
167 | | - crtc->pipe); |
---|
| 245 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
168 | 246 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
169 | 247 | __entry->level = wm->level; |
---|
170 | 248 | __entry->cxsr = wm->cxsr; |
---|
.. | .. |
---|
198 | 276 | |
---|
199 | 277 | TP_fast_assign( |
---|
200 | 278 | __entry->pipe = crtc->pipe; |
---|
201 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
202 | | - crtc->pipe); |
---|
| 279 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
203 | 280 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
204 | 281 | __entry->sprite0_start = sprite0_start; |
---|
205 | 282 | __entry->sprite1_start = sprite1_start; |
---|
.. | .. |
---|
220 | 297 | |
---|
221 | 298 | TP_STRUCT__entry( |
---|
222 | 299 | __field(enum pipe, pipe) |
---|
223 | | - __field(const char *, name) |
---|
224 | 300 | __field(u32, frame) |
---|
225 | 301 | __field(u32, scanline) |
---|
226 | 302 | __array(int, src, 4) |
---|
227 | 303 | __array(int, dst, 4) |
---|
| 304 | + __string(name, plane->name) |
---|
228 | 305 | ), |
---|
229 | 306 | |
---|
230 | 307 | TP_fast_assign( |
---|
| 308 | + __assign_str(name, plane->name); |
---|
231 | 309 | __entry->pipe = crtc->pipe; |
---|
232 | | - __entry->name = plane->name; |
---|
233 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
234 | | - crtc->pipe); |
---|
| 310 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
235 | 311 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
236 | 312 | memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); |
---|
237 | 313 | memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); |
---|
238 | 314 | ), |
---|
239 | 315 | |
---|
240 | 316 | TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, |
---|
241 | | - pipe_name(__entry->pipe), __entry->name, |
---|
| 317 | + pipe_name(__entry->pipe), __get_str(name), |
---|
242 | 318 | __entry->frame, __entry->scanline, |
---|
243 | 319 | DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), |
---|
244 | 320 | DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) |
---|
.. | .. |
---|
250 | 326 | |
---|
251 | 327 | TP_STRUCT__entry( |
---|
252 | 328 | __field(enum pipe, pipe) |
---|
253 | | - __field(const char *, name) |
---|
| 329 | + __field(u32, frame) |
---|
| 330 | + __field(u32, scanline) |
---|
| 331 | + __string(name, plane->name) |
---|
| 332 | + ), |
---|
| 333 | + |
---|
| 334 | + TP_fast_assign( |
---|
| 335 | + __assign_str(name, plane->name); |
---|
| 336 | + __entry->pipe = crtc->pipe; |
---|
| 337 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 338 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
| 339 | + ), |
---|
| 340 | + |
---|
| 341 | + TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", |
---|
| 342 | + pipe_name(__entry->pipe), __get_str(name), |
---|
| 343 | + __entry->frame, __entry->scanline) |
---|
| 344 | +); |
---|
| 345 | + |
---|
| 346 | +/* fbc */ |
---|
| 347 | + |
---|
| 348 | +TRACE_EVENT(intel_fbc_activate, |
---|
| 349 | + TP_PROTO(struct intel_crtc *crtc), |
---|
| 350 | + TP_ARGS(crtc), |
---|
| 351 | + |
---|
| 352 | + TP_STRUCT__entry( |
---|
| 353 | + __field(enum pipe, pipe) |
---|
254 | 354 | __field(u32, frame) |
---|
255 | 355 | __field(u32, scanline) |
---|
256 | 356 | ), |
---|
257 | 357 | |
---|
258 | 358 | TP_fast_assign( |
---|
259 | 359 | __entry->pipe = crtc->pipe; |
---|
260 | | - __entry->name = plane->name; |
---|
261 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
262 | | - crtc->pipe); |
---|
| 360 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
263 | 361 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
264 | 362 | ), |
---|
265 | 363 | |
---|
266 | | - TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", |
---|
267 | | - pipe_name(__entry->pipe), __entry->name, |
---|
268 | | - __entry->frame, __entry->scanline) |
---|
| 364 | + TP_printk("pipe %c, frame=%u, scanline=%u", |
---|
| 365 | + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) |
---|
| 366 | +); |
---|
| 367 | + |
---|
| 368 | +TRACE_EVENT(intel_fbc_deactivate, |
---|
| 369 | + TP_PROTO(struct intel_crtc *crtc), |
---|
| 370 | + TP_ARGS(crtc), |
---|
| 371 | + |
---|
| 372 | + TP_STRUCT__entry( |
---|
| 373 | + __field(enum pipe, pipe) |
---|
| 374 | + __field(u32, frame) |
---|
| 375 | + __field(u32, scanline) |
---|
| 376 | + ), |
---|
| 377 | + |
---|
| 378 | + TP_fast_assign( |
---|
| 379 | + __entry->pipe = crtc->pipe; |
---|
| 380 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 381 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
| 382 | + ), |
---|
| 383 | + |
---|
| 384 | + TP_printk("pipe %c, frame=%u, scanline=%u", |
---|
| 385 | + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) |
---|
| 386 | +); |
---|
| 387 | + |
---|
| 388 | +TRACE_EVENT(intel_fbc_nuke, |
---|
| 389 | + TP_PROTO(struct intel_crtc *crtc), |
---|
| 390 | + TP_ARGS(crtc), |
---|
| 391 | + |
---|
| 392 | + TP_STRUCT__entry( |
---|
| 393 | + __field(enum pipe, pipe) |
---|
| 394 | + __field(u32, frame) |
---|
| 395 | + __field(u32, scanline) |
---|
| 396 | + ), |
---|
| 397 | + |
---|
| 398 | + TP_fast_assign( |
---|
| 399 | + __entry->pipe = crtc->pipe; |
---|
| 400 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
| 401 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
| 402 | + ), |
---|
| 403 | + |
---|
| 404 | + TP_printk("pipe %c, frame=%u, scanline=%u", |
---|
| 405 | + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) |
---|
269 | 406 | ); |
---|
270 | 407 | |
---|
271 | 408 | /* pipe updates */ |
---|
272 | 409 | |
---|
273 | | -TRACE_EVENT(i915_pipe_update_start, |
---|
| 410 | +TRACE_EVENT(intel_pipe_update_start, |
---|
274 | 411 | TP_PROTO(struct intel_crtc *crtc), |
---|
275 | 412 | TP_ARGS(crtc), |
---|
276 | 413 | |
---|
.. | .. |
---|
284 | 421 | |
---|
285 | 422 | TP_fast_assign( |
---|
286 | 423 | __entry->pipe = crtc->pipe; |
---|
287 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
---|
288 | | - crtc->pipe); |
---|
| 424 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
---|
289 | 425 | __entry->scanline = intel_get_crtc_scanline(crtc); |
---|
290 | 426 | __entry->min = crtc->debug.min_vbl; |
---|
291 | 427 | __entry->max = crtc->debug.max_vbl; |
---|
.. | .. |
---|
296 | 432 | __entry->scanline, __entry->min, __entry->max) |
---|
297 | 433 | ); |
---|
298 | 434 | |
---|
299 | | -TRACE_EVENT(i915_pipe_update_vblank_evaded, |
---|
| 435 | +TRACE_EVENT(intel_pipe_update_vblank_evaded, |
---|
300 | 436 | TP_PROTO(struct intel_crtc *crtc), |
---|
301 | 437 | TP_ARGS(crtc), |
---|
302 | 438 | |
---|
.. | .. |
---|
321 | 457 | __entry->scanline, __entry->min, __entry->max) |
---|
322 | 458 | ); |
---|
323 | 459 | |
---|
324 | | -TRACE_EVENT(i915_pipe_update_end, |
---|
| 460 | +TRACE_EVENT(intel_pipe_update_end, |
---|
325 | 461 | TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end), |
---|
326 | 462 | TP_ARGS(crtc, frame, scanline_end), |
---|
327 | 463 | |
---|
.. | .. |
---|
589 | 725 | TP_printk("dev=%d, vm=%p", __entry->dev, __entry->vm) |
---|
590 | 726 | ); |
---|
591 | 727 | |
---|
592 | | -TRACE_EVENT(i915_gem_ring_sync_to, |
---|
593 | | - TP_PROTO(struct i915_request *to, struct i915_request *from), |
---|
594 | | - TP_ARGS(to, from), |
---|
595 | | - |
---|
596 | | - TP_STRUCT__entry( |
---|
597 | | - __field(u32, dev) |
---|
598 | | - __field(u32, from_class) |
---|
599 | | - __field(u32, from_instance) |
---|
600 | | - __field(u32, to_class) |
---|
601 | | - __field(u32, to_instance) |
---|
602 | | - __field(u32, seqno) |
---|
603 | | - ), |
---|
604 | | - |
---|
605 | | - TP_fast_assign( |
---|
606 | | - __entry->dev = from->i915->drm.primary->index; |
---|
607 | | - __entry->from_class = from->engine->uabi_class; |
---|
608 | | - __entry->from_instance = from->engine->instance; |
---|
609 | | - __entry->to_class = to->engine->uabi_class; |
---|
610 | | - __entry->to_instance = to->engine->instance; |
---|
611 | | - __entry->seqno = from->global_seqno; |
---|
612 | | - ), |
---|
613 | | - |
---|
614 | | - TP_printk("dev=%u, sync-from=%u:%u, sync-to=%u:%u, seqno=%u", |
---|
615 | | - __entry->dev, |
---|
616 | | - __entry->from_class, __entry->from_instance, |
---|
617 | | - __entry->to_class, __entry->to_instance, |
---|
618 | | - __entry->seqno) |
---|
619 | | -); |
---|
620 | | - |
---|
621 | 728 | TRACE_EVENT(i915_request_queue, |
---|
622 | 729 | TP_PROTO(struct i915_request *rq, u32 flags), |
---|
623 | 730 | TP_ARGS(rq, flags), |
---|
624 | 731 | |
---|
625 | 732 | TP_STRUCT__entry( |
---|
626 | 733 | __field(u32, dev) |
---|
627 | | - __field(u32, hw_id) |
---|
628 | 734 | __field(u64, ctx) |
---|
629 | 735 | __field(u16, class) |
---|
630 | 736 | __field(u16, instance) |
---|
.. | .. |
---|
633 | 739 | ), |
---|
634 | 740 | |
---|
635 | 741 | TP_fast_assign( |
---|
636 | | - __entry->dev = rq->i915->drm.primary->index; |
---|
637 | | - __entry->hw_id = rq->gem_context->hw_id; |
---|
| 742 | + __entry->dev = rq->engine->i915->drm.primary->index; |
---|
638 | 743 | __entry->class = rq->engine->uabi_class; |
---|
639 | | - __entry->instance = rq->engine->instance; |
---|
| 744 | + __entry->instance = rq->engine->uabi_instance; |
---|
640 | 745 | __entry->ctx = rq->fence.context; |
---|
641 | 746 | __entry->seqno = rq->fence.seqno; |
---|
642 | 747 | __entry->flags = flags; |
---|
643 | 748 | ), |
---|
644 | 749 | |
---|
645 | | - TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, flags=0x%x", |
---|
| 750 | + TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, flags=0x%x", |
---|
646 | 751 | __entry->dev, __entry->class, __entry->instance, |
---|
647 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
---|
648 | | - __entry->flags) |
---|
| 752 | + __entry->ctx, __entry->seqno, __entry->flags) |
---|
649 | 753 | ); |
---|
650 | 754 | |
---|
651 | 755 | DECLARE_EVENT_CLASS(i915_request, |
---|
.. | .. |
---|
654 | 758 | |
---|
655 | 759 | TP_STRUCT__entry( |
---|
656 | 760 | __field(u32, dev) |
---|
657 | | - __field(u32, hw_id) |
---|
658 | 761 | __field(u64, ctx) |
---|
659 | 762 | __field(u16, class) |
---|
660 | 763 | __field(u16, instance) |
---|
661 | 764 | __field(u32, seqno) |
---|
662 | | - __field(u32, global) |
---|
663 | 765 | ), |
---|
664 | 766 | |
---|
665 | 767 | TP_fast_assign( |
---|
666 | | - __entry->dev = rq->i915->drm.primary->index; |
---|
667 | | - __entry->hw_id = rq->gem_context->hw_id; |
---|
| 768 | + __entry->dev = rq->engine->i915->drm.primary->index; |
---|
668 | 769 | __entry->class = rq->engine->uabi_class; |
---|
669 | | - __entry->instance = rq->engine->instance; |
---|
| 770 | + __entry->instance = rq->engine->uabi_instance; |
---|
670 | 771 | __entry->ctx = rq->fence.context; |
---|
671 | 772 | __entry->seqno = rq->fence.seqno; |
---|
672 | | - __entry->global = rq->global_seqno; |
---|
673 | 773 | ), |
---|
674 | 774 | |
---|
675 | | - TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u", |
---|
| 775 | + TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u", |
---|
676 | 776 | __entry->dev, __entry->class, __entry->instance, |
---|
677 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
---|
678 | | - __entry->global) |
---|
| 777 | + __entry->ctx, __entry->seqno) |
---|
679 | 778 | ); |
---|
680 | 779 | |
---|
681 | 780 | DEFINE_EVENT(i915_request, i915_request_add, |
---|
.. | .. |
---|
700 | 799 | |
---|
701 | 800 | TP_STRUCT__entry( |
---|
702 | 801 | __field(u32, dev) |
---|
703 | | - __field(u32, hw_id) |
---|
704 | 802 | __field(u64, ctx) |
---|
705 | 803 | __field(u16, class) |
---|
706 | 804 | __field(u16, instance) |
---|
707 | 805 | __field(u32, seqno) |
---|
708 | | - __field(u32, global_seqno) |
---|
709 | 806 | __field(u32, port) |
---|
710 | | - __field(u32, prio) |
---|
| 807 | + __field(s32, prio) |
---|
711 | 808 | ), |
---|
712 | 809 | |
---|
713 | 810 | TP_fast_assign( |
---|
714 | | - __entry->dev = rq->i915->drm.primary->index; |
---|
715 | | - __entry->hw_id = rq->gem_context->hw_id; |
---|
| 811 | + __entry->dev = rq->engine->i915->drm.primary->index; |
---|
716 | 812 | __entry->class = rq->engine->uabi_class; |
---|
717 | | - __entry->instance = rq->engine->instance; |
---|
| 813 | + __entry->instance = rq->engine->uabi_instance; |
---|
718 | 814 | __entry->ctx = rq->fence.context; |
---|
719 | 815 | __entry->seqno = rq->fence.seqno; |
---|
720 | | - __entry->global_seqno = rq->global_seqno; |
---|
721 | 816 | __entry->prio = rq->sched.attr.priority; |
---|
722 | 817 | __entry->port = port; |
---|
723 | 818 | ), |
---|
724 | 819 | |
---|
725 | | - TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, prio=%u, global=%u, port=%u", |
---|
| 820 | + TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, prio=%d, port=%u", |
---|
726 | 821 | __entry->dev, __entry->class, __entry->instance, |
---|
727 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
---|
728 | | - __entry->prio, __entry->global_seqno, __entry->port) |
---|
| 822 | + __entry->ctx, __entry->seqno, |
---|
| 823 | + __entry->prio, __entry->port) |
---|
729 | 824 | ); |
---|
730 | 825 | |
---|
731 | 826 | TRACE_EVENT(i915_request_out, |
---|
.. | .. |
---|
734 | 829 | |
---|
735 | 830 | TP_STRUCT__entry( |
---|
736 | 831 | __field(u32, dev) |
---|
737 | | - __field(u32, hw_id) |
---|
738 | 832 | __field(u64, ctx) |
---|
739 | 833 | __field(u16, class) |
---|
740 | 834 | __field(u16, instance) |
---|
741 | 835 | __field(u32, seqno) |
---|
742 | | - __field(u32, global_seqno) |
---|
743 | 836 | __field(u32, completed) |
---|
744 | 837 | ), |
---|
745 | 838 | |
---|
746 | 839 | TP_fast_assign( |
---|
747 | | - __entry->dev = rq->i915->drm.primary->index; |
---|
748 | | - __entry->hw_id = rq->gem_context->hw_id; |
---|
| 840 | + __entry->dev = rq->engine->i915->drm.primary->index; |
---|
749 | 841 | __entry->class = rq->engine->uabi_class; |
---|
750 | | - __entry->instance = rq->engine->instance; |
---|
| 842 | + __entry->instance = rq->engine->uabi_instance; |
---|
751 | 843 | __entry->ctx = rq->fence.context; |
---|
752 | 844 | __entry->seqno = rq->fence.seqno; |
---|
753 | | - __entry->global_seqno = rq->global_seqno; |
---|
754 | 845 | __entry->completed = i915_request_completed(rq); |
---|
755 | 846 | ), |
---|
756 | 847 | |
---|
757 | | - TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u, completed?=%u", |
---|
| 848 | + TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, completed?=%u", |
---|
758 | 849 | __entry->dev, __entry->class, __entry->instance, |
---|
759 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
---|
760 | | - __entry->global_seqno, __entry->completed) |
---|
| 850 | + __entry->ctx, __entry->seqno, __entry->completed) |
---|
761 | 851 | ); |
---|
762 | 852 | |
---|
763 | 853 | #else |
---|
.. | .. |
---|
784 | 874 | #endif |
---|
785 | 875 | #endif |
---|
786 | 876 | |
---|
787 | | -TRACE_EVENT(intel_engine_notify, |
---|
788 | | - TP_PROTO(struct intel_engine_cs *engine, bool waiters), |
---|
789 | | - TP_ARGS(engine, waiters), |
---|
790 | | - |
---|
791 | | - TP_STRUCT__entry( |
---|
792 | | - __field(u32, dev) |
---|
793 | | - __field(u16, class) |
---|
794 | | - __field(u16, instance) |
---|
795 | | - __field(u32, seqno) |
---|
796 | | - __field(bool, waiters) |
---|
797 | | - ), |
---|
798 | | - |
---|
799 | | - TP_fast_assign( |
---|
800 | | - __entry->dev = engine->i915->drm.primary->index; |
---|
801 | | - __entry->class = engine->uabi_class; |
---|
802 | | - __entry->instance = engine->instance; |
---|
803 | | - __entry->seqno = intel_engine_get_seqno(engine); |
---|
804 | | - __entry->waiters = waiters; |
---|
805 | | - ), |
---|
806 | | - |
---|
807 | | - TP_printk("dev=%u, engine=%u:%u, seqno=%u, waiters=%u", |
---|
808 | | - __entry->dev, __entry->class, __entry->instance, |
---|
809 | | - __entry->seqno, __entry->waiters) |
---|
810 | | -); |
---|
811 | | - |
---|
812 | 877 | DEFINE_EVENT(i915_request, i915_request_retire, |
---|
813 | 878 | TP_PROTO(struct i915_request *rq), |
---|
814 | 879 | TP_ARGS(rq) |
---|
.. | .. |
---|
820 | 885 | |
---|
821 | 886 | TP_STRUCT__entry( |
---|
822 | 887 | __field(u32, dev) |
---|
823 | | - __field(u32, hw_id) |
---|
824 | 888 | __field(u64, ctx) |
---|
825 | 889 | __field(u16, class) |
---|
826 | 890 | __field(u16, instance) |
---|
827 | 891 | __field(u32, seqno) |
---|
828 | | - __field(u32, global) |
---|
829 | 892 | __field(unsigned int, flags) |
---|
830 | 893 | ), |
---|
831 | 894 | |
---|
.. | .. |
---|
836 | 899 | * less desirable. |
---|
837 | 900 | */ |
---|
838 | 901 | TP_fast_assign( |
---|
839 | | - __entry->dev = rq->i915->drm.primary->index; |
---|
840 | | - __entry->hw_id = rq->gem_context->hw_id; |
---|
| 902 | + __entry->dev = rq->engine->i915->drm.primary->index; |
---|
841 | 903 | __entry->class = rq->engine->uabi_class; |
---|
842 | | - __entry->instance = rq->engine->instance; |
---|
| 904 | + __entry->instance = rq->engine->uabi_instance; |
---|
843 | 905 | __entry->ctx = rq->fence.context; |
---|
844 | 906 | __entry->seqno = rq->fence.seqno; |
---|
845 | | - __entry->global = rq->global_seqno; |
---|
846 | 907 | __entry->flags = flags; |
---|
847 | 908 | ), |
---|
848 | 909 | |
---|
849 | | - TP_printk("dev=%u, engine=%u:%u, hw_id=%u, ctx=%llu, seqno=%u, global=%u, blocking=%u, flags=0x%x", |
---|
| 910 | + TP_printk("dev=%u, engine=%u:%u, ctx=%llu, seqno=%u, flags=0x%x", |
---|
850 | 911 | __entry->dev, __entry->class, __entry->instance, |
---|
851 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
---|
852 | | - __entry->global, !!(__entry->flags & I915_WAIT_LOCKED), |
---|
| 912 | + __entry->ctx, __entry->seqno, |
---|
853 | 913 | __entry->flags) |
---|
854 | 914 | ); |
---|
855 | 915 | |
---|
.. | .. |
---|
952 | 1012 | TP_STRUCT__entry( |
---|
953 | 1013 | __field(u32, dev) |
---|
954 | 1014 | __field(struct i915_gem_context *, ctx) |
---|
955 | | - __field(u32, hw_id) |
---|
956 | 1015 | __field(struct i915_address_space *, vm) |
---|
957 | 1016 | ), |
---|
958 | 1017 | |
---|
959 | 1018 | TP_fast_assign( |
---|
960 | 1019 | __entry->dev = ctx->i915->drm.primary->index; |
---|
961 | 1020 | __entry->ctx = ctx; |
---|
962 | | - __entry->hw_id = ctx->hw_id; |
---|
963 | | - __entry->vm = ctx->ppgtt ? &ctx->ppgtt->vm : NULL; |
---|
| 1021 | + __entry->vm = rcu_access_pointer(ctx->vm); |
---|
964 | 1022 | ), |
---|
965 | 1023 | |
---|
966 | | - TP_printk("dev=%u, ctx=%p, ctx_vm=%p, hw_id=%u", |
---|
967 | | - __entry->dev, __entry->ctx, __entry->vm, __entry->hw_id) |
---|
| 1024 | + TP_printk("dev=%u, ctx=%p, ctx_vm=%p", |
---|
| 1025 | + __entry->dev, __entry->ctx, __entry->vm) |
---|
968 | 1026 | ) |
---|
969 | 1027 | |
---|
970 | 1028 | DEFINE_EVENT(i915_context, i915_context_create, |
---|