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