| .. | .. |
|---|
| 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 |
|---|
| 6 | | -#define NOTRACE |
|---|
| 7 | | -#endif |
|---|
| 8 | | - |
|---|
| 9 | 5 | #include <linux/stringify.h> |
|---|
| 10 | 6 | #include <linux/types.h> |
|---|
| 11 | 7 | #include <linux/tracepoint.h> |
|---|
| 12 | 8 | |
|---|
| 13 | | -#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 | + |
|---|
| 14 | 14 | #include "i915_drv.h" |
|---|
| 15 | | -#include "intel_drv.h" |
|---|
| 16 | | -#include "intel_ringbuffer.h" |
|---|
| 15 | +#include "i915_irq.h" |
|---|
| 17 | 16 | |
|---|
| 18 | 17 | #undef TRACE_SYSTEM |
|---|
| 19 | 18 | #define TRACE_SYSTEM i915 |
|---|
| 20 | 19 | #define TRACE_INCLUDE_FILE i915_trace |
|---|
| 21 | 20 | |
|---|
| 22 | 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 | +); |
|---|
| 23 | 99 | |
|---|
| 24 | 100 | TRACE_EVENT(intel_cpu_fifo_underrun, |
|---|
| 25 | 101 | TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe), |
|---|
| .. | .. |
|---|
| 32 | 108 | ), |
|---|
| 33 | 109 | |
|---|
| 34 | 110 | TP_fast_assign( |
|---|
| 111 | + struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); |
|---|
| 35 | 112 | __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)); |
|---|
| 113 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 114 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 38 | 115 | ), |
|---|
| 39 | 116 | |
|---|
| 40 | 117 | TP_printk("pipe %c, frame=%u, scanline=%u", |
|---|
| .. | .. |
|---|
| 54 | 131 | |
|---|
| 55 | 132 | TP_fast_assign( |
|---|
| 56 | 133 | enum pipe pipe = pch_transcoder; |
|---|
| 134 | + struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); |
|---|
| 57 | 135 | __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)); |
|---|
| 136 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 137 | + __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 60 | 138 | ), |
|---|
| 61 | 139 | |
|---|
| 62 | 140 | TP_printk("pch transcoder %c, frame=%u, scanline=%u", |
|---|
| .. | .. |
|---|
| 76 | 154 | ), |
|---|
| 77 | 155 | |
|---|
| 78 | 156 | 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)); |
|---|
| 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); |
|---|
| 85 | 161 | } |
|---|
| 86 | 162 | __entry->old = old; |
|---|
| 87 | 163 | __entry->new = new; |
|---|
| .. | .. |
|---|
| 118 | 194 | |
|---|
| 119 | 195 | TP_fast_assign( |
|---|
| 120 | 196 | __entry->pipe = crtc->pipe; |
|---|
| 121 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
|---|
| 122 | | - crtc->pipe); |
|---|
| 197 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 123 | 198 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 124 | 199 | __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; |
|---|
| 125 | 200 | __entry->sprite = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; |
|---|
| .. | .. |
|---|
| 163 | 238 | |
|---|
| 164 | 239 | TP_fast_assign( |
|---|
| 165 | 240 | __entry->pipe = crtc->pipe; |
|---|
| 166 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
|---|
| 167 | | - crtc->pipe); |
|---|
| 241 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 168 | 242 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 169 | 243 | __entry->level = wm->level; |
|---|
| 170 | 244 | __entry->cxsr = wm->cxsr; |
|---|
| .. | .. |
|---|
| 198 | 272 | |
|---|
| 199 | 273 | TP_fast_assign( |
|---|
| 200 | 274 | __entry->pipe = crtc->pipe; |
|---|
| 201 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
|---|
| 202 | | - crtc->pipe); |
|---|
| 275 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 203 | 276 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 204 | 277 | __entry->sprite0_start = sprite0_start; |
|---|
| 205 | 278 | __entry->sprite1_start = sprite1_start; |
|---|
| .. | .. |
|---|
| 220 | 293 | |
|---|
| 221 | 294 | TP_STRUCT__entry( |
|---|
| 222 | 295 | __field(enum pipe, pipe) |
|---|
| 223 | | - __field(const char *, name) |
|---|
| 224 | 296 | __field(u32, frame) |
|---|
| 225 | 297 | __field(u32, scanline) |
|---|
| 226 | 298 | __array(int, src, 4) |
|---|
| 227 | 299 | __array(int, dst, 4) |
|---|
| 300 | + __string(name, plane->name) |
|---|
| 228 | 301 | ), |
|---|
| 229 | 302 | |
|---|
| 230 | 303 | TP_fast_assign( |
|---|
| 304 | + __assign_str(name, plane->name); |
|---|
| 231 | 305 | __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); |
|---|
| 306 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 235 | 307 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 236 | 308 | memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); |
|---|
| 237 | 309 | memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); |
|---|
| 238 | 310 | ), |
|---|
| 239 | 311 | |
|---|
| 240 | 312 | TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, |
|---|
| 241 | | - pipe_name(__entry->pipe), __entry->name, |
|---|
| 313 | + pipe_name(__entry->pipe), __get_str(name), |
|---|
| 242 | 314 | __entry->frame, __entry->scanline, |
|---|
| 243 | 315 | DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), |
|---|
| 244 | 316 | DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) |
|---|
| .. | .. |
|---|
| 250 | 322 | |
|---|
| 251 | 323 | TP_STRUCT__entry( |
|---|
| 252 | 324 | __field(enum pipe, pipe) |
|---|
| 253 | | - __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) |
|---|
| 254 | 350 | __field(u32, frame) |
|---|
| 255 | 351 | __field(u32, scanline) |
|---|
| 256 | 352 | ), |
|---|
| 257 | 353 | |
|---|
| 258 | 354 | TP_fast_assign( |
|---|
| 259 | 355 | __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); |
|---|
| 356 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 263 | 357 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 264 | 358 | ), |
|---|
| 265 | 359 | |
|---|
| 266 | | - TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", |
|---|
| 267 | | - pipe_name(__entry->pipe), __entry->name, |
|---|
| 268 | | - __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) |
|---|
| 269 | 402 | ); |
|---|
| 270 | 403 | |
|---|
| 271 | 404 | /* pipe updates */ |
|---|
| 272 | 405 | |
|---|
| 273 | | -TRACE_EVENT(i915_pipe_update_start, |
|---|
| 406 | +TRACE_EVENT(intel_pipe_update_start, |
|---|
| 274 | 407 | TP_PROTO(struct intel_crtc *crtc), |
|---|
| 275 | 408 | TP_ARGS(crtc), |
|---|
| 276 | 409 | |
|---|
| .. | .. |
|---|
| 284 | 417 | |
|---|
| 285 | 418 | TP_fast_assign( |
|---|
| 286 | 419 | __entry->pipe = crtc->pipe; |
|---|
| 287 | | - __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, |
|---|
| 288 | | - crtc->pipe); |
|---|
| 420 | + __entry->frame = intel_crtc_get_vblank_counter(crtc); |
|---|
| 289 | 421 | __entry->scanline = intel_get_crtc_scanline(crtc); |
|---|
| 290 | 422 | __entry->min = crtc->debug.min_vbl; |
|---|
| 291 | 423 | __entry->max = crtc->debug.max_vbl; |
|---|
| .. | .. |
|---|
| 296 | 428 | __entry->scanline, __entry->min, __entry->max) |
|---|
| 297 | 429 | ); |
|---|
| 298 | 430 | |
|---|
| 299 | | -TRACE_EVENT(i915_pipe_update_vblank_evaded, |
|---|
| 431 | +TRACE_EVENT(intel_pipe_update_vblank_evaded, |
|---|
| 300 | 432 | TP_PROTO(struct intel_crtc *crtc), |
|---|
| 301 | 433 | TP_ARGS(crtc), |
|---|
| 302 | 434 | |
|---|
| .. | .. |
|---|
| 321 | 453 | __entry->scanline, __entry->min, __entry->max) |
|---|
| 322 | 454 | ); |
|---|
| 323 | 455 | |
|---|
| 324 | | -TRACE_EVENT(i915_pipe_update_end, |
|---|
| 456 | +TRACE_EVENT(intel_pipe_update_end, |
|---|
| 325 | 457 | TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end), |
|---|
| 326 | 458 | TP_ARGS(crtc, frame, scanline_end), |
|---|
| 327 | 459 | |
|---|
| .. | .. |
|---|
| 589 | 721 | TP_printk("dev=%d, vm=%p", __entry->dev, __entry->vm) |
|---|
| 590 | 722 | ); |
|---|
| 591 | 723 | |
|---|
| 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 | 724 | TRACE_EVENT(i915_request_queue, |
|---|
| 622 | 725 | TP_PROTO(struct i915_request *rq, u32 flags), |
|---|
| 623 | 726 | TP_ARGS(rq, flags), |
|---|
| 624 | 727 | |
|---|
| 625 | 728 | TP_STRUCT__entry( |
|---|
| 626 | 729 | __field(u32, dev) |
|---|
| 627 | | - __field(u32, hw_id) |
|---|
| 628 | 730 | __field(u64, ctx) |
|---|
| 629 | 731 | __field(u16, class) |
|---|
| 630 | 732 | __field(u16, instance) |
|---|
| .. | .. |
|---|
| 633 | 735 | ), |
|---|
| 634 | 736 | |
|---|
| 635 | 737 | TP_fast_assign( |
|---|
| 636 | | - __entry->dev = rq->i915->drm.primary->index; |
|---|
| 637 | | - __entry->hw_id = rq->gem_context->hw_id; |
|---|
| 738 | + __entry->dev = rq->engine->i915->drm.primary->index; |
|---|
| 638 | 739 | __entry->class = rq->engine->uabi_class; |
|---|
| 639 | | - __entry->instance = rq->engine->instance; |
|---|
| 740 | + __entry->instance = rq->engine->uabi_instance; |
|---|
| 640 | 741 | __entry->ctx = rq->fence.context; |
|---|
| 641 | 742 | __entry->seqno = rq->fence.seqno; |
|---|
| 642 | 743 | __entry->flags = flags; |
|---|
| 643 | 744 | ), |
|---|
| 644 | 745 | |
|---|
| 645 | | - 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", |
|---|
| 646 | 747 | __entry->dev, __entry->class, __entry->instance, |
|---|
| 647 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
|---|
| 648 | | - __entry->flags) |
|---|
| 748 | + __entry->ctx, __entry->seqno, __entry->flags) |
|---|
| 649 | 749 | ); |
|---|
| 650 | 750 | |
|---|
| 651 | 751 | DECLARE_EVENT_CLASS(i915_request, |
|---|
| .. | .. |
|---|
| 654 | 754 | |
|---|
| 655 | 755 | TP_STRUCT__entry( |
|---|
| 656 | 756 | __field(u32, dev) |
|---|
| 657 | | - __field(u32, hw_id) |
|---|
| 658 | 757 | __field(u64, ctx) |
|---|
| 659 | 758 | __field(u16, class) |
|---|
| 660 | 759 | __field(u16, instance) |
|---|
| 661 | 760 | __field(u32, seqno) |
|---|
| 662 | | - __field(u32, global) |
|---|
| 663 | 761 | ), |
|---|
| 664 | 762 | |
|---|
| 665 | 763 | TP_fast_assign( |
|---|
| 666 | | - __entry->dev = rq->i915->drm.primary->index; |
|---|
| 667 | | - __entry->hw_id = rq->gem_context->hw_id; |
|---|
| 764 | + __entry->dev = rq->engine->i915->drm.primary->index; |
|---|
| 668 | 765 | __entry->class = rq->engine->uabi_class; |
|---|
| 669 | | - __entry->instance = rq->engine->instance; |
|---|
| 766 | + __entry->instance = rq->engine->uabi_instance; |
|---|
| 670 | 767 | __entry->ctx = rq->fence.context; |
|---|
| 671 | 768 | __entry->seqno = rq->fence.seqno; |
|---|
| 672 | | - __entry->global = rq->global_seqno; |
|---|
| 673 | 769 | ), |
|---|
| 674 | 770 | |
|---|
| 675 | | - 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", |
|---|
| 676 | 772 | __entry->dev, __entry->class, __entry->instance, |
|---|
| 677 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
|---|
| 678 | | - __entry->global) |
|---|
| 773 | + __entry->ctx, __entry->seqno) |
|---|
| 679 | 774 | ); |
|---|
| 680 | 775 | |
|---|
| 681 | 776 | DEFINE_EVENT(i915_request, i915_request_add, |
|---|
| .. | .. |
|---|
| 683 | 778 | TP_ARGS(rq) |
|---|
| 684 | 779 | ); |
|---|
| 685 | 780 | |
|---|
| 686 | | -#if defined(CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS) && !defined(NOTRACE) |
|---|
| 781 | +#if defined(CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS) |
|---|
| 687 | 782 | DEFINE_EVENT(i915_request, i915_request_submit, |
|---|
| 688 | 783 | TP_PROTO(struct i915_request *rq), |
|---|
| 689 | 784 | TP_ARGS(rq) |
|---|
| .. | .. |
|---|
| 700 | 795 | |
|---|
| 701 | 796 | TP_STRUCT__entry( |
|---|
| 702 | 797 | __field(u32, dev) |
|---|
| 703 | | - __field(u32, hw_id) |
|---|
| 704 | 798 | __field(u64, ctx) |
|---|
| 705 | 799 | __field(u16, class) |
|---|
| 706 | 800 | __field(u16, instance) |
|---|
| 707 | 801 | __field(u32, seqno) |
|---|
| 708 | | - __field(u32, global_seqno) |
|---|
| 709 | 802 | __field(u32, port) |
|---|
| 710 | | - __field(u32, prio) |
|---|
| 803 | + __field(s32, prio) |
|---|
| 711 | 804 | ), |
|---|
| 712 | 805 | |
|---|
| 713 | 806 | TP_fast_assign( |
|---|
| 714 | | - __entry->dev = rq->i915->drm.primary->index; |
|---|
| 715 | | - __entry->hw_id = rq->gem_context->hw_id; |
|---|
| 807 | + __entry->dev = rq->engine->i915->drm.primary->index; |
|---|
| 716 | 808 | __entry->class = rq->engine->uabi_class; |
|---|
| 717 | | - __entry->instance = rq->engine->instance; |
|---|
| 809 | + __entry->instance = rq->engine->uabi_instance; |
|---|
| 718 | 810 | __entry->ctx = rq->fence.context; |
|---|
| 719 | 811 | __entry->seqno = rq->fence.seqno; |
|---|
| 720 | | - __entry->global_seqno = rq->global_seqno; |
|---|
| 721 | 812 | __entry->prio = rq->sched.attr.priority; |
|---|
| 722 | 813 | __entry->port = port; |
|---|
| 723 | 814 | ), |
|---|
| 724 | 815 | |
|---|
| 725 | | - 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", |
|---|
| 726 | 817 | __entry->dev, __entry->class, __entry->instance, |
|---|
| 727 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
|---|
| 728 | | - __entry->prio, __entry->global_seqno, __entry->port) |
|---|
| 818 | + __entry->ctx, __entry->seqno, |
|---|
| 819 | + __entry->prio, __entry->port) |
|---|
| 729 | 820 | ); |
|---|
| 730 | 821 | |
|---|
| 731 | 822 | TRACE_EVENT(i915_request_out, |
|---|
| .. | .. |
|---|
| 734 | 825 | |
|---|
| 735 | 826 | TP_STRUCT__entry( |
|---|
| 736 | 827 | __field(u32, dev) |
|---|
| 737 | | - __field(u32, hw_id) |
|---|
| 738 | 828 | __field(u64, ctx) |
|---|
| 739 | 829 | __field(u16, class) |
|---|
| 740 | 830 | __field(u16, instance) |
|---|
| 741 | 831 | __field(u32, seqno) |
|---|
| 742 | | - __field(u32, global_seqno) |
|---|
| 743 | 832 | __field(u32, completed) |
|---|
| 744 | 833 | ), |
|---|
| 745 | 834 | |
|---|
| 746 | 835 | TP_fast_assign( |
|---|
| 747 | | - __entry->dev = rq->i915->drm.primary->index; |
|---|
| 748 | | - __entry->hw_id = rq->gem_context->hw_id; |
|---|
| 836 | + __entry->dev = rq->engine->i915->drm.primary->index; |
|---|
| 749 | 837 | __entry->class = rq->engine->uabi_class; |
|---|
| 750 | | - __entry->instance = rq->engine->instance; |
|---|
| 838 | + __entry->instance = rq->engine->uabi_instance; |
|---|
| 751 | 839 | __entry->ctx = rq->fence.context; |
|---|
| 752 | 840 | __entry->seqno = rq->fence.seqno; |
|---|
| 753 | | - __entry->global_seqno = rq->global_seqno; |
|---|
| 754 | 841 | __entry->completed = i915_request_completed(rq); |
|---|
| 755 | 842 | ), |
|---|
| 756 | 843 | |
|---|
| 757 | | - 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", |
|---|
| 758 | 845 | __entry->dev, __entry->class, __entry->instance, |
|---|
| 759 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
|---|
| 760 | | - __entry->global_seqno, __entry->completed) |
|---|
| 846 | + __entry->ctx, __entry->seqno, __entry->completed) |
|---|
| 761 | 847 | ); |
|---|
| 762 | 848 | |
|---|
| 763 | 849 | #else |
|---|
| .. | .. |
|---|
| 784 | 870 | #endif |
|---|
| 785 | 871 | #endif |
|---|
| 786 | 872 | |
|---|
| 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 | 873 | DEFINE_EVENT(i915_request, i915_request_retire, |
|---|
| 813 | 874 | TP_PROTO(struct i915_request *rq), |
|---|
| 814 | 875 | TP_ARGS(rq) |
|---|
| .. | .. |
|---|
| 820 | 881 | |
|---|
| 821 | 882 | TP_STRUCT__entry( |
|---|
| 822 | 883 | __field(u32, dev) |
|---|
| 823 | | - __field(u32, hw_id) |
|---|
| 824 | 884 | __field(u64, ctx) |
|---|
| 825 | 885 | __field(u16, class) |
|---|
| 826 | 886 | __field(u16, instance) |
|---|
| 827 | 887 | __field(u32, seqno) |
|---|
| 828 | | - __field(u32, global) |
|---|
| 829 | 888 | __field(unsigned int, flags) |
|---|
| 830 | 889 | ), |
|---|
| 831 | 890 | |
|---|
| .. | .. |
|---|
| 836 | 895 | * less desirable. |
|---|
| 837 | 896 | */ |
|---|
| 838 | 897 | TP_fast_assign( |
|---|
| 839 | | - __entry->dev = rq->i915->drm.primary->index; |
|---|
| 840 | | - __entry->hw_id = rq->gem_context->hw_id; |
|---|
| 898 | + __entry->dev = rq->engine->i915->drm.primary->index; |
|---|
| 841 | 899 | __entry->class = rq->engine->uabi_class; |
|---|
| 842 | | - __entry->instance = rq->engine->instance; |
|---|
| 900 | + __entry->instance = rq->engine->uabi_instance; |
|---|
| 843 | 901 | __entry->ctx = rq->fence.context; |
|---|
| 844 | 902 | __entry->seqno = rq->fence.seqno; |
|---|
| 845 | | - __entry->global = rq->global_seqno; |
|---|
| 846 | 903 | __entry->flags = flags; |
|---|
| 847 | 904 | ), |
|---|
| 848 | 905 | |
|---|
| 849 | | - 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", |
|---|
| 850 | 907 | __entry->dev, __entry->class, __entry->instance, |
|---|
| 851 | | - __entry->hw_id, __entry->ctx, __entry->seqno, |
|---|
| 852 | | - __entry->global, !!(__entry->flags & I915_WAIT_LOCKED), |
|---|
| 908 | + __entry->ctx, __entry->seqno, |
|---|
| 853 | 909 | __entry->flags) |
|---|
| 854 | 910 | ); |
|---|
| 855 | 911 | |
|---|
| .. | .. |
|---|
| 952 | 1008 | TP_STRUCT__entry( |
|---|
| 953 | 1009 | __field(u32, dev) |
|---|
| 954 | 1010 | __field(struct i915_gem_context *, ctx) |
|---|
| 955 | | - __field(u32, hw_id) |
|---|
| 956 | 1011 | __field(struct i915_address_space *, vm) |
|---|
| 957 | 1012 | ), |
|---|
| 958 | 1013 | |
|---|
| 959 | 1014 | TP_fast_assign( |
|---|
| 960 | 1015 | __entry->dev = ctx->i915->drm.primary->index; |
|---|
| 961 | 1016 | __entry->ctx = ctx; |
|---|
| 962 | | - __entry->hw_id = ctx->hw_id; |
|---|
| 963 | | - __entry->vm = ctx->ppgtt ? &ctx->ppgtt->vm : NULL; |
|---|
| 1017 | + __entry->vm = rcu_access_pointer(ctx->vm); |
|---|
| 964 | 1018 | ), |
|---|
| 965 | 1019 | |
|---|
| 966 | | - TP_printk("dev=%u, ctx=%p, ctx_vm=%p, hw_id=%u", |
|---|
| 967 | | - __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) |
|---|
| 968 | 1022 | ) |
|---|
| 969 | 1023 | |
|---|
| 970 | 1024 | DEFINE_EVENT(i915_context, i915_context_create, |
|---|