Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/trace: split out display trace to a separate file

Add display/intel_display_trace.[ch] for defining display
tracepoints. The main goal is to reduce cross-includes between gem and
display. It would be possible split up tracing even further, but that
would lead to more boilerplate.

We end up having to include intel_crtc.h in a few places because it was
pulled in implicitly via intel_de.h -> i915_trace.h -> intel_crtc.h, and
that's no longer the case.

There should be no changes to tracepoints.

v3:
- Rebase

v2:
- Define TRACE_INCLUDE_PATH relative to define_trace.h (Chris)
- Remove useless comments (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7862ad764fbd0748d903c76bc632d3d277874e5b.1638961423.git.jani.nikula@intel.com

+621 -590
+1
drivers/gpu/drm/i915/Makefile
··· 258 258 display/intel_crt.o \ 259 259 display/intel_ddi.o \ 260 260 display/intel_ddi_buf_trans.o \ 261 + display/intel_display_trace.o \ 261 262 display/intel_dp.o \ 262 263 display/intel_dp_aux.o \ 263 264 display/intel_dp_aux_backlight.o \
+1
drivers/gpu/drm/i915/display/g4x_dp.c
··· 9 9 #include "intel_audio.h" 10 10 #include "intel_backlight.h" 11 11 #include "intel_connector.h" 12 + #include "intel_crtc.h" 12 13 #include "intel_de.h" 13 14 #include "intel_display_types.h" 14 15 #include "intel_dp.h"
+1
drivers/gpu/drm/i915/display/g4x_hdmi.c
··· 8 8 #include "g4x_hdmi.h" 9 9 #include "intel_audio.h" 10 10 #include "intel_connector.h" 11 + #include "intel_crtc.h" 11 12 #include "intel_de.h" 12 13 #include "intel_display_types.h" 13 14 #include "intel_dpio_phy.h"
+3 -2
drivers/gpu/drm/i915/display/intel_atomic_plane.c
··· 35 35 #include <drm/drm_fourcc.h> 36 36 #include <drm/drm_plane_helper.h> 37 37 38 - #include "i915_trace.h" 38 + #include "gt/intel_rps.h" 39 + 39 40 #include "intel_atomic_plane.h" 40 41 #include "intel_cdclk.h" 42 + #include "intel_display_trace.h" 41 43 #include "intel_display_types.h" 42 44 #include "intel_fb.h" 43 45 #include "intel_fb_pin.h" 44 46 #include "intel_pm.h" 45 47 #include "intel_sprite.h" 46 - #include "gt/intel_rps.h" 47 48 48 49 static void intel_plane_state_reset(struct intel_plane_state *plane_state, 49 50 struct intel_plane *plane)
+1
drivers/gpu/drm/i915/display/intel_audio.c
··· 31 31 #include "intel_atomic.h" 32 32 #include "intel_audio.h" 33 33 #include "intel_cdclk.h" 34 + #include "intel_crtc.h" 34 35 #include "intel_de.h" 35 36 #include "intel_display_types.h" 36 37 #include "intel_lpe_audio.h"
+1
drivers/gpu/drm/i915/display/intel_cdclk.c
··· 27 27 #include "intel_audio.h" 28 28 #include "intel_bw.h" 29 29 #include "intel_cdclk.h" 30 + #include "intel_crtc.h" 30 31 #include "intel_de.h" 31 32 #include "intel_display_types.h" 32 33 #include "intel_pcode.h"
+2 -2
drivers/gpu/drm/i915/display/intel_crtc.c
··· 12 12 #include <drm/drm_plane_helper.h> 13 13 #include <drm/drm_vblank_work.h> 14 14 15 - #include "i915_trace.h" 16 15 #include "i915_vgpu.h" 16 + #include "i9xx_plane.h" 17 17 #include "icl_dsi.h" 18 18 #include "intel_atomic.h" 19 19 #include "intel_atomic_plane.h" ··· 21 21 #include "intel_crtc.h" 22 22 #include "intel_cursor.h" 23 23 #include "intel_display_debugfs.h" 24 + #include "intel_display_trace.h" 24 25 #include "intel_display_types.h" 25 26 #include "intel_dsi.h" 26 27 #include "intel_pipe_crc.h" 27 28 #include "intel_psr.h" 28 29 #include "intel_sprite.h" 29 30 #include "intel_vrr.h" 30 - #include "i9xx_plane.h" 31 31 #include "skl_universal_plane.h" 32 32 33 33 static void assert_vblank_disabled(struct drm_crtc *crtc)
+9
drivers/gpu/drm/i915/display/intel_display_trace.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright © 2021 Intel Corporation 4 + */ 5 + 6 + #ifndef __CHECKER__ 7 + #define CREATE_TRACE_POINTS 8 + #include "intel_display_trace.h" 9 + #endif
+587
drivers/gpu/drm/i915/display/intel_display_trace.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright © 2021 Intel Corporation 4 + */ 5 + 6 + #undef TRACE_SYSTEM 7 + #define TRACE_SYSTEM i915 8 + 9 + #if !defined(__INTEL_DISPLAY_TRACE_H__) || defined(TRACE_HEADER_MULTI_READ) 10 + #define __INTEL_DISPLAY_TRACE_H__ 11 + 12 + #include <linux/types.h> 13 + #include <linux/tracepoint.h> 14 + 15 + #include "i915_drv.h" 16 + #include "intel_crtc.h" 17 + #include "intel_display_types.h" 18 + 19 + TRACE_EVENT(intel_pipe_enable, 20 + TP_PROTO(struct intel_crtc *crtc), 21 + TP_ARGS(crtc), 22 + 23 + TP_STRUCT__entry( 24 + __array(u32, frame, 3) 25 + __array(u32, scanline, 3) 26 + __field(enum pipe, pipe) 27 + ), 28 + TP_fast_assign( 29 + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 30 + struct intel_crtc *it__; 31 + for_each_intel_crtc(&dev_priv->drm, it__) { 32 + __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); 33 + __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); 34 + } 35 + __entry->pipe = crtc->pipe; 36 + ), 37 + 38 + TP_printk("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 39 + pipe_name(__entry->pipe), 40 + __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 41 + __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 42 + __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 43 + ); 44 + 45 + TRACE_EVENT(intel_pipe_disable, 46 + TP_PROTO(struct intel_crtc *crtc), 47 + TP_ARGS(crtc), 48 + 49 + TP_STRUCT__entry( 50 + __array(u32, frame, 3) 51 + __array(u32, scanline, 3) 52 + __field(enum pipe, pipe) 53 + ), 54 + 55 + TP_fast_assign( 56 + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 57 + struct intel_crtc *it__; 58 + for_each_intel_crtc(&dev_priv->drm, it__) { 59 + __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); 60 + __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); 61 + } 62 + __entry->pipe = crtc->pipe; 63 + ), 64 + 65 + TP_printk("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 66 + pipe_name(__entry->pipe), 67 + __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 68 + __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 69 + __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 70 + ); 71 + 72 + TRACE_EVENT(intel_pipe_crc, 73 + TP_PROTO(struct intel_crtc *crtc, const u32 *crcs), 74 + TP_ARGS(crtc, crcs), 75 + 76 + TP_STRUCT__entry( 77 + __field(enum pipe, pipe) 78 + __field(u32, frame) 79 + __field(u32, scanline) 80 + __array(u32, crcs, 5) 81 + ), 82 + 83 + TP_fast_assign( 84 + __entry->pipe = crtc->pipe; 85 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 86 + __entry->scanline = intel_get_crtc_scanline(crtc); 87 + memcpy(__entry->crcs, crcs, sizeof(__entry->crcs)); 88 + ), 89 + 90 + TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x", 91 + pipe_name(__entry->pipe), __entry->frame, __entry->scanline, 92 + __entry->crcs[0], __entry->crcs[1], __entry->crcs[2], 93 + __entry->crcs[3], __entry->crcs[4]) 94 + ); 95 + 96 + TRACE_EVENT(intel_cpu_fifo_underrun, 97 + TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe), 98 + TP_ARGS(dev_priv, pipe), 99 + 100 + TP_STRUCT__entry( 101 + __field(enum pipe, pipe) 102 + __field(u32, frame) 103 + __field(u32, scanline) 104 + ), 105 + 106 + TP_fast_assign( 107 + struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); 108 + __entry->pipe = pipe; 109 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 110 + __entry->scanline = intel_get_crtc_scanline(crtc); 111 + ), 112 + 113 + TP_printk("pipe %c, frame=%u, scanline=%u", 114 + pipe_name(__entry->pipe), 115 + __entry->frame, __entry->scanline) 116 + ); 117 + 118 + TRACE_EVENT(intel_pch_fifo_underrun, 119 + TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pch_transcoder), 120 + TP_ARGS(dev_priv, pch_transcoder), 121 + 122 + TP_STRUCT__entry( 123 + __field(enum pipe, pipe) 124 + __field(u32, frame) 125 + __field(u32, scanline) 126 + ), 127 + 128 + TP_fast_assign( 129 + enum pipe pipe = pch_transcoder; 130 + struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); 131 + __entry->pipe = pipe; 132 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 133 + __entry->scanline = intel_get_crtc_scanline(crtc); 134 + ), 135 + 136 + TP_printk("pch transcoder %c, frame=%u, scanline=%u", 137 + pipe_name(__entry->pipe), 138 + __entry->frame, __entry->scanline) 139 + ); 140 + 141 + TRACE_EVENT(intel_memory_cxsr, 142 + TP_PROTO(struct drm_i915_private *dev_priv, bool old, bool new), 143 + TP_ARGS(dev_priv, old, new), 144 + 145 + TP_STRUCT__entry( 146 + __array(u32, frame, 3) 147 + __array(u32, scanline, 3) 148 + __field(bool, old) 149 + __field(bool, new) 150 + ), 151 + 152 + TP_fast_assign( 153 + struct intel_crtc *crtc; 154 + for_each_intel_crtc(&dev_priv->drm, crtc) { 155 + __entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc); 156 + __entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc); 157 + } 158 + __entry->old = old; 159 + __entry->new = new; 160 + ), 161 + 162 + TP_printk("%s->%s, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 163 + onoff(__entry->old), onoff(__entry->new), 164 + __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 165 + __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 166 + __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 167 + ); 168 + 169 + TRACE_EVENT(g4x_wm, 170 + TP_PROTO(struct intel_crtc *crtc, const struct g4x_wm_values *wm), 171 + TP_ARGS(crtc, wm), 172 + 173 + TP_STRUCT__entry( 174 + __field(enum pipe, pipe) 175 + __field(u32, frame) 176 + __field(u32, scanline) 177 + __field(u16, primary) 178 + __field(u16, sprite) 179 + __field(u16, cursor) 180 + __field(u16, sr_plane) 181 + __field(u16, sr_cursor) 182 + __field(u16, sr_fbc) 183 + __field(u16, hpll_plane) 184 + __field(u16, hpll_cursor) 185 + __field(u16, hpll_fbc) 186 + __field(bool, cxsr) 187 + __field(bool, hpll) 188 + __field(bool, fbc) 189 + ), 190 + 191 + TP_fast_assign( 192 + __entry->pipe = crtc->pipe; 193 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 194 + __entry->scanline = intel_get_crtc_scanline(crtc); 195 + __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; 196 + __entry->sprite = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; 197 + __entry->cursor = wm->pipe[crtc->pipe].plane[PLANE_CURSOR]; 198 + __entry->sr_plane = wm->sr.plane; 199 + __entry->sr_cursor = wm->sr.cursor; 200 + __entry->sr_fbc = wm->sr.fbc; 201 + __entry->hpll_plane = wm->hpll.plane; 202 + __entry->hpll_cursor = wm->hpll.cursor; 203 + __entry->hpll_fbc = wm->hpll.fbc; 204 + __entry->cxsr = wm->cxsr; 205 + __entry->hpll = wm->hpll_en; 206 + __entry->fbc = wm->fbc_en; 207 + ), 208 + 209 + TP_printk("pipe %c, frame=%u, scanline=%u, wm %d/%d/%d, sr %s/%d/%d/%d, hpll %s/%d/%d/%d, fbc %s", 210 + pipe_name(__entry->pipe), __entry->frame, __entry->scanline, 211 + __entry->primary, __entry->sprite, __entry->cursor, 212 + yesno(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc, 213 + yesno(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc, 214 + yesno(__entry->fbc)) 215 + ); 216 + 217 + TRACE_EVENT(vlv_wm, 218 + TP_PROTO(struct intel_crtc *crtc, const struct vlv_wm_values *wm), 219 + TP_ARGS(crtc, wm), 220 + 221 + TP_STRUCT__entry( 222 + __field(enum pipe, pipe) 223 + __field(u32, frame) 224 + __field(u32, scanline) 225 + __field(u32, level) 226 + __field(u32, cxsr) 227 + __field(u32, primary) 228 + __field(u32, sprite0) 229 + __field(u32, sprite1) 230 + __field(u32, cursor) 231 + __field(u32, sr_plane) 232 + __field(u32, sr_cursor) 233 + ), 234 + 235 + TP_fast_assign( 236 + __entry->pipe = crtc->pipe; 237 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 238 + __entry->scanline = intel_get_crtc_scanline(crtc); 239 + __entry->level = wm->level; 240 + __entry->cxsr = wm->cxsr; 241 + __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; 242 + __entry->sprite0 = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; 243 + __entry->sprite1 = wm->pipe[crtc->pipe].plane[PLANE_SPRITE1]; 244 + __entry->cursor = wm->pipe[crtc->pipe].plane[PLANE_CURSOR]; 245 + __entry->sr_plane = wm->sr.plane; 246 + __entry->sr_cursor = wm->sr.cursor; 247 + ), 248 + 249 + TP_printk("pipe %c, frame=%u, scanline=%u, level=%d, cxsr=%d, wm %d/%d/%d/%d, sr %d/%d", 250 + pipe_name(__entry->pipe), __entry->frame, 251 + __entry->scanline, __entry->level, __entry->cxsr, 252 + __entry->primary, __entry->sprite0, __entry->sprite1, __entry->cursor, 253 + __entry->sr_plane, __entry->sr_cursor) 254 + ); 255 + 256 + TRACE_EVENT(vlv_fifo_size, 257 + TP_PROTO(struct intel_crtc *crtc, u32 sprite0_start, u32 sprite1_start, u32 fifo_size), 258 + TP_ARGS(crtc, sprite0_start, sprite1_start, fifo_size), 259 + 260 + TP_STRUCT__entry( 261 + __field(enum pipe, pipe) 262 + __field(u32, frame) 263 + __field(u32, scanline) 264 + __field(u32, sprite0_start) 265 + __field(u32, sprite1_start) 266 + __field(u32, fifo_size) 267 + ), 268 + 269 + TP_fast_assign( 270 + __entry->pipe = crtc->pipe; 271 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 272 + __entry->scanline = intel_get_crtc_scanline(crtc); 273 + __entry->sprite0_start = sprite0_start; 274 + __entry->sprite1_start = sprite1_start; 275 + __entry->fifo_size = fifo_size; 276 + ), 277 + 278 + TP_printk("pipe %c, frame=%u, scanline=%u, %d/%d/%d", 279 + pipe_name(__entry->pipe), __entry->frame, 280 + __entry->scanline, __entry->sprite0_start, 281 + __entry->sprite1_start, __entry->fifo_size) 282 + ); 283 + 284 + TRACE_EVENT(intel_plane_update_noarm, 285 + TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 286 + TP_ARGS(plane, crtc), 287 + 288 + TP_STRUCT__entry( 289 + __field(enum pipe, pipe) 290 + __field(u32, frame) 291 + __field(u32, scanline) 292 + __array(int, src, 4) 293 + __array(int, dst, 4) 294 + __string(name, plane->name) 295 + ), 296 + 297 + TP_fast_assign( 298 + __assign_str(name, plane->name); 299 + __entry->pipe = crtc->pipe; 300 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 301 + __entry->scanline = intel_get_crtc_scanline(crtc); 302 + memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); 303 + memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); 304 + ), 305 + 306 + TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, 307 + pipe_name(__entry->pipe), __get_str(name), 308 + __entry->frame, __entry->scanline, 309 + DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), 310 + DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) 311 + ); 312 + 313 + TRACE_EVENT(intel_plane_update_arm, 314 + TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 315 + TP_ARGS(plane, crtc), 316 + 317 + TP_STRUCT__entry( 318 + __field(enum pipe, pipe) 319 + __field(u32, frame) 320 + __field(u32, scanline) 321 + __array(int, src, 4) 322 + __array(int, dst, 4) 323 + __string(name, plane->name) 324 + ), 325 + 326 + TP_fast_assign( 327 + __assign_str(name, plane->name); 328 + __entry->pipe = crtc->pipe; 329 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 330 + __entry->scanline = intel_get_crtc_scanline(crtc); 331 + memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); 332 + memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); 333 + ), 334 + 335 + TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, 336 + pipe_name(__entry->pipe), __get_str(name), 337 + __entry->frame, __entry->scanline, 338 + DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), 339 + DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) 340 + ); 341 + 342 + TRACE_EVENT(intel_plane_disable_arm, 343 + TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 344 + TP_ARGS(plane, crtc), 345 + 346 + TP_STRUCT__entry( 347 + __field(enum pipe, pipe) 348 + __field(u32, frame) 349 + __field(u32, scanline) 350 + __string(name, plane->name) 351 + ), 352 + 353 + TP_fast_assign( 354 + __assign_str(name, plane->name); 355 + __entry->pipe = crtc->pipe; 356 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 357 + __entry->scanline = intel_get_crtc_scanline(crtc); 358 + ), 359 + 360 + TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", 361 + pipe_name(__entry->pipe), __get_str(name), 362 + __entry->frame, __entry->scanline) 363 + ); 364 + 365 + TRACE_EVENT(intel_fbc_activate, 366 + TP_PROTO(struct intel_plane *plane), 367 + TP_ARGS(plane), 368 + 369 + TP_STRUCT__entry( 370 + __field(enum pipe, pipe) 371 + __field(u32, frame) 372 + __field(u32, scanline) 373 + ), 374 + 375 + TP_fast_assign( 376 + struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 377 + plane->pipe); 378 + __entry->pipe = crtc->pipe; 379 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 380 + __entry->scanline = intel_get_crtc_scanline(crtc); 381 + ), 382 + 383 + TP_printk("pipe %c, frame=%u, scanline=%u", 384 + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 385 + ); 386 + 387 + TRACE_EVENT(intel_fbc_deactivate, 388 + TP_PROTO(struct intel_plane *plane), 389 + TP_ARGS(plane), 390 + 391 + TP_STRUCT__entry( 392 + __field(enum pipe, pipe) 393 + __field(u32, frame) 394 + __field(u32, scanline) 395 + ), 396 + 397 + TP_fast_assign( 398 + struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 399 + plane->pipe); 400 + __entry->pipe = crtc->pipe; 401 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 402 + __entry->scanline = intel_get_crtc_scanline(crtc); 403 + ), 404 + 405 + TP_printk("pipe %c, frame=%u, scanline=%u", 406 + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 407 + ); 408 + 409 + TRACE_EVENT(intel_fbc_nuke, 410 + TP_PROTO(struct intel_plane *plane), 411 + TP_ARGS(plane), 412 + 413 + TP_STRUCT__entry( 414 + __field(enum pipe, pipe) 415 + __field(u32, frame) 416 + __field(u32, scanline) 417 + ), 418 + 419 + TP_fast_assign( 420 + struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 421 + plane->pipe); 422 + __entry->pipe = crtc->pipe; 423 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 424 + __entry->scanline = intel_get_crtc_scanline(crtc); 425 + ), 426 + 427 + TP_printk("pipe %c, frame=%u, scanline=%u", 428 + pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 429 + ); 430 + 431 + TRACE_EVENT(intel_crtc_vblank_work_start, 432 + TP_PROTO(struct intel_crtc *crtc), 433 + TP_ARGS(crtc), 434 + 435 + TP_STRUCT__entry( 436 + __field(enum pipe, pipe) 437 + __field(u32, frame) 438 + __field(u32, scanline) 439 + ), 440 + 441 + TP_fast_assign( 442 + __entry->pipe = crtc->pipe; 443 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 444 + __entry->scanline = intel_get_crtc_scanline(crtc); 445 + ), 446 + 447 + TP_printk("pipe %c, frame=%u, scanline=%u", 448 + pipe_name(__entry->pipe), __entry->frame, 449 + __entry->scanline) 450 + ); 451 + 452 + TRACE_EVENT(intel_crtc_vblank_work_end, 453 + TP_PROTO(struct intel_crtc *crtc), 454 + TP_ARGS(crtc), 455 + 456 + TP_STRUCT__entry( 457 + __field(enum pipe, pipe) 458 + __field(u32, frame) 459 + __field(u32, scanline) 460 + ), 461 + 462 + TP_fast_assign( 463 + __entry->pipe = crtc->pipe; 464 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 465 + __entry->scanline = intel_get_crtc_scanline(crtc); 466 + ), 467 + 468 + TP_printk("pipe %c, frame=%u, scanline=%u", 469 + pipe_name(__entry->pipe), __entry->frame, 470 + __entry->scanline) 471 + ); 472 + 473 + TRACE_EVENT(intel_pipe_update_start, 474 + TP_PROTO(struct intel_crtc *crtc), 475 + TP_ARGS(crtc), 476 + 477 + TP_STRUCT__entry( 478 + __field(enum pipe, pipe) 479 + __field(u32, frame) 480 + __field(u32, scanline) 481 + __field(u32, min) 482 + __field(u32, max) 483 + ), 484 + 485 + TP_fast_assign( 486 + __entry->pipe = crtc->pipe; 487 + __entry->frame = intel_crtc_get_vblank_counter(crtc); 488 + __entry->scanline = intel_get_crtc_scanline(crtc); 489 + __entry->min = crtc->debug.min_vbl; 490 + __entry->max = crtc->debug.max_vbl; 491 + ), 492 + 493 + TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", 494 + pipe_name(__entry->pipe), __entry->frame, 495 + __entry->scanline, __entry->min, __entry->max) 496 + ); 497 + 498 + TRACE_EVENT(intel_pipe_update_vblank_evaded, 499 + TP_PROTO(struct intel_crtc *crtc), 500 + TP_ARGS(crtc), 501 + 502 + TP_STRUCT__entry( 503 + __field(enum pipe, pipe) 504 + __field(u32, frame) 505 + __field(u32, scanline) 506 + __field(u32, min) 507 + __field(u32, max) 508 + ), 509 + 510 + TP_fast_assign( 511 + __entry->pipe = crtc->pipe; 512 + __entry->frame = crtc->debug.start_vbl_count; 513 + __entry->scanline = crtc->debug.scanline_start; 514 + __entry->min = crtc->debug.min_vbl; 515 + __entry->max = crtc->debug.max_vbl; 516 + ), 517 + 518 + TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", 519 + pipe_name(__entry->pipe), __entry->frame, 520 + __entry->scanline, __entry->min, __entry->max) 521 + ); 522 + 523 + TRACE_EVENT(intel_pipe_update_end, 524 + TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end), 525 + TP_ARGS(crtc, frame, scanline_end), 526 + 527 + TP_STRUCT__entry( 528 + __field(enum pipe, pipe) 529 + __field(u32, frame) 530 + __field(u32, scanline) 531 + ), 532 + 533 + TP_fast_assign( 534 + __entry->pipe = crtc->pipe; 535 + __entry->frame = frame; 536 + __entry->scanline = scanline_end; 537 + ), 538 + 539 + TP_printk("pipe %c, frame=%u, scanline=%u", 540 + pipe_name(__entry->pipe), __entry->frame, 541 + __entry->scanline) 542 + ); 543 + 544 + TRACE_EVENT(intel_frontbuffer_invalidate, 545 + TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin), 546 + TP_ARGS(frontbuffer_bits, origin), 547 + 548 + TP_STRUCT__entry( 549 + __field(unsigned int, frontbuffer_bits) 550 + __field(unsigned int, origin) 551 + ), 552 + 553 + TP_fast_assign( 554 + __entry->frontbuffer_bits = frontbuffer_bits; 555 + __entry->origin = origin; 556 + ), 557 + 558 + TP_printk("frontbuffer_bits=0x%08x, origin=%u", 559 + __entry->frontbuffer_bits, __entry->origin) 560 + ); 561 + 562 + TRACE_EVENT(intel_frontbuffer_flush, 563 + TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin), 564 + TP_ARGS(frontbuffer_bits, origin), 565 + 566 + TP_STRUCT__entry( 567 + __field(unsigned int, frontbuffer_bits) 568 + __field(unsigned int, origin) 569 + ), 570 + 571 + TP_fast_assign( 572 + __entry->frontbuffer_bits = frontbuffer_bits; 573 + __entry->origin = origin; 574 + ), 575 + 576 + TP_printk("frontbuffer_bits=0x%08x, origin=%u", 577 + __entry->frontbuffer_bits, __entry->origin) 578 + ); 579 + 580 + #endif /* __INTEL_DISPLAY_TRACE_H__ */ 581 + 582 + /* This part must be outside protection */ 583 + #undef TRACE_INCLUDE_PATH 584 + #undef TRACE_INCLUDE_FILE 585 + #define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/i915/display 586 + #define TRACE_INCLUDE_FILE intel_display_trace 587 + #include <trace/define_trace.h>
+1
drivers/gpu/drm/i915/display/intel_dp.c
··· 47 47 #include "intel_audio.h" 48 48 #include "intel_backlight.h" 49 49 #include "intel_connector.h" 50 + #include "intel_crtc.h" 50 51 #include "intel_ddi.h" 51 52 #include "intel_de.h" 52 53 #include "intel_display_types.h"
+1 -1
drivers/gpu/drm/i915/display/intel_fbc.c
··· 41 41 #include <drm/drm_fourcc.h> 42 42 43 43 #include "i915_drv.h" 44 - #include "i915_trace.h" 45 44 #include "i915_vgpu.h" 46 45 #include "intel_cdclk.h" 47 46 #include "intel_de.h" 47 + #include "intel_display_trace.h" 48 48 #include "intel_display_types.h" 49 49 #include "intel_fbc.h" 50 50 #include "intel_frontbuffer.h"
+1
drivers/gpu/drm/i915/display/intel_fdi.c
··· 4 4 */ 5 5 6 6 #include "intel_atomic.h" 7 + #include "intel_crtc.h" 7 8 #include "intel_ddi.h" 8 9 #include "intel_de.h" 9 10 #include "intel_display_types.h"
+1 -1
drivers/gpu/drm/i915/display/intel_fifo_underrun.c
··· 26 26 */ 27 27 28 28 #include "i915_drv.h" 29 - #include "i915_trace.h" 30 29 #include "intel_de.h" 30 + #include "intel_display_trace.h" 31 31 #include "intel_display_types.h" 32 32 #include "intel_fbc.h" 33 33 #include "intel_fifo_underrun.h"
+3 -4
drivers/gpu/drm/i915/display/intel_frontbuffer.c
··· 55 55 * cancelled as soon as busyness is detected. 56 56 */ 57 57 58 - #include "display/intel_dp.h" 59 - 60 58 #include "i915_drv.h" 61 - #include "i915_trace.h" 59 + #include "intel_display_trace.h" 62 60 #include "intel_display_types.h" 61 + #include "intel_dp.h" 62 + #include "intel_drrs.h" 63 63 #include "intel_fbc.h" 64 64 #include "intel_frontbuffer.h" 65 - #include "intel_drrs.h" 66 65 #include "intel_psr.h" 67 66 68 67 /**
+2 -2
drivers/gpu/drm/i915/display/intel_sprite.c
··· 40 40 #include <drm/drm_rect.h> 41 41 42 42 #include "i915_drv.h" 43 - #include "i915_trace.h" 44 43 #include "i915_vgpu.h" 44 + #include "i9xx_plane.h" 45 45 #include "intel_atomic_plane.h" 46 + #include "intel_crtc.h" 46 47 #include "intel_de.h" 47 48 #include "intel_display_types.h" 48 49 #include "intel_fb.h" 49 50 #include "intel_frontbuffer.h" 50 51 #include "intel_sprite.h" 51 - #include "i9xx_plane.h" 52 52 #include "intel_vrr.h" 53 53 54 54 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
+1
drivers/gpu/drm/i915/display/intel_tv.c
··· 36 36 37 37 #include "i915_drv.h" 38 38 #include "intel_connector.h" 39 + #include "intel_crtc.h" 39 40 #include "intel_de.h" 40 41 #include "intel_display_types.h" 41 42 #include "intel_hotplug.h"
+3 -1
drivers/gpu/drm/i915/display/intel_vdsc.c
··· 6 6 * Manasi Navare <manasi.d.navare@intel.com> 7 7 */ 8 8 #include <linux/limits.h> 9 + 9 10 #include "i915_drv.h" 11 + #include "intel_crtc.h" 10 12 #include "intel_de.h" 11 13 #include "intel_display_types.h" 12 14 #include "intel_dsi.h" 13 - #include "intel_vdsc.h" 14 15 #include "intel_qp_tables.h" 16 + #include "intel_vdsc.h" 15 17 16 18 enum ROW_INDEX_BPP { 17 19 ROW_INDEX_6BPP = 0,
-1
drivers/gpu/drm/i915/i915_debugfs.c
··· 48 48 #include "i915_debugfs_params.h" 49 49 #include "i915_irq.h" 50 50 #include "i915_scheduler.h" 51 - #include "i915_trace.h" 52 51 #include "intel_pm.h" 53 52 54 53 static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
-1
drivers/gpu/drm/i915/i915_driver.c
··· 82 82 #include "i915_suspend.h" 83 83 #include "i915_switcheroo.h" 84 84 #include "i915_sysfs.h" 85 - #include "i915_trace.h" 86 85 #include "i915_vgpu.h" 87 86 #include "intel_dram.h" 88 87 #include "intel_gvt.h"
+1 -1
drivers/gpu/drm/i915/i915_irq.c
··· 35 35 #include <drm/drm_drv.h> 36 36 37 37 #include "display/intel_de.h" 38 + #include "display/intel_display_trace.h" 38 39 #include "display/intel_display_types.h" 39 40 #include "display/intel_fifo_underrun.h" 40 41 #include "display/intel_hotplug.h" ··· 50 49 51 50 #include "i915_drv.h" 52 51 #include "i915_irq.h" 53 - #include "i915_trace.h" 54 52 #include "intel_pm.h" 55 53 56 54 /**
-573
drivers/gpu/drm/i915/i915_trace.h
··· 12 12 13 13 #include <drm/drm_drv.h> 14 14 15 - #include "display/intel_crtc.h" 16 - #include "display/intel_display_types.h" 17 15 #include "gt/intel_engine.h" 18 16 19 17 #include "i915_drv.h" 20 18 #include "i915_irq.h" 21 - 22 - /* watermark/fifo updates */ 23 - 24 - TRACE_EVENT(intel_pipe_enable, 25 - TP_PROTO(struct intel_crtc *crtc), 26 - TP_ARGS(crtc), 27 - 28 - TP_STRUCT__entry( 29 - __array(u32, frame, 3) 30 - __array(u32, scanline, 3) 31 - __field(enum pipe, pipe) 32 - ), 33 - TP_fast_assign( 34 - struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 35 - struct intel_crtc *it__; 36 - for_each_intel_crtc(&dev_priv->drm, it__) { 37 - __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); 38 - __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); 39 - } 40 - __entry->pipe = crtc->pipe; 41 - ), 42 - 43 - TP_printk("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 44 - pipe_name(__entry->pipe), 45 - __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 46 - __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 47 - __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 48 - ); 49 - 50 - TRACE_EVENT(intel_pipe_disable, 51 - TP_PROTO(struct intel_crtc *crtc), 52 - TP_ARGS(crtc), 53 - 54 - TP_STRUCT__entry( 55 - __array(u32, frame, 3) 56 - __array(u32, scanline, 3) 57 - __field(enum pipe, pipe) 58 - ), 59 - 60 - TP_fast_assign( 61 - struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); 62 - struct intel_crtc *it__; 63 - for_each_intel_crtc(&dev_priv->drm, it__) { 64 - __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); 65 - __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); 66 - } 67 - __entry->pipe = crtc->pipe; 68 - ), 69 - 70 - TP_printk("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 71 - pipe_name(__entry->pipe), 72 - __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 73 - __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 74 - __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 75 - ); 76 - 77 - TRACE_EVENT(intel_pipe_crc, 78 - TP_PROTO(struct intel_crtc *crtc, const u32 *crcs), 79 - TP_ARGS(crtc, crcs), 80 - 81 - TP_STRUCT__entry( 82 - __field(enum pipe, pipe) 83 - __field(u32, frame) 84 - __field(u32, scanline) 85 - __array(u32, crcs, 5) 86 - ), 87 - 88 - TP_fast_assign( 89 - __entry->pipe = crtc->pipe; 90 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 91 - __entry->scanline = intel_get_crtc_scanline(crtc); 92 - memcpy(__entry->crcs, crcs, sizeof(__entry->crcs)); 93 - ), 94 - 95 - TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x", 96 - pipe_name(__entry->pipe), __entry->frame, __entry->scanline, 97 - __entry->crcs[0], __entry->crcs[1], __entry->crcs[2], 98 - __entry->crcs[3], __entry->crcs[4]) 99 - ); 100 - 101 - TRACE_EVENT(intel_cpu_fifo_underrun, 102 - TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pipe), 103 - TP_ARGS(dev_priv, pipe), 104 - 105 - TP_STRUCT__entry( 106 - __field(enum pipe, pipe) 107 - __field(u32, frame) 108 - __field(u32, scanline) 109 - ), 110 - 111 - TP_fast_assign( 112 - struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); 113 - __entry->pipe = pipe; 114 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 115 - __entry->scanline = intel_get_crtc_scanline(crtc); 116 - ), 117 - 118 - TP_printk("pipe %c, frame=%u, scanline=%u", 119 - pipe_name(__entry->pipe), 120 - __entry->frame, __entry->scanline) 121 - ); 122 - 123 - TRACE_EVENT(intel_pch_fifo_underrun, 124 - TP_PROTO(struct drm_i915_private *dev_priv, enum pipe pch_transcoder), 125 - TP_ARGS(dev_priv, pch_transcoder), 126 - 127 - TP_STRUCT__entry( 128 - __field(enum pipe, pipe) 129 - __field(u32, frame) 130 - __field(u32, scanline) 131 - ), 132 - 133 - TP_fast_assign( 134 - enum pipe pipe = pch_transcoder; 135 - struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); 136 - __entry->pipe = pipe; 137 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 138 - __entry->scanline = intel_get_crtc_scanline(crtc); 139 - ), 140 - 141 - TP_printk("pch transcoder %c, frame=%u, scanline=%u", 142 - pipe_name(__entry->pipe), 143 - __entry->frame, __entry->scanline) 144 - ); 145 - 146 - TRACE_EVENT(intel_memory_cxsr, 147 - TP_PROTO(struct drm_i915_private *dev_priv, bool old, bool new), 148 - TP_ARGS(dev_priv, old, new), 149 - 150 - TP_STRUCT__entry( 151 - __array(u32, frame, 3) 152 - __array(u32, scanline, 3) 153 - __field(bool, old) 154 - __field(bool, new) 155 - ), 156 - 157 - TP_fast_assign( 158 - struct intel_crtc *crtc; 159 - for_each_intel_crtc(&dev_priv->drm, crtc) { 160 - __entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc); 161 - __entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc); 162 - } 163 - __entry->old = old; 164 - __entry->new = new; 165 - ), 166 - 167 - TP_printk("%s->%s, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", 168 - onoff(__entry->old), onoff(__entry->new), 169 - __entry->frame[PIPE_A], __entry->scanline[PIPE_A], 170 - __entry->frame[PIPE_B], __entry->scanline[PIPE_B], 171 - __entry->frame[PIPE_C], __entry->scanline[PIPE_C]) 172 - ); 173 - 174 - TRACE_EVENT(g4x_wm, 175 - TP_PROTO(struct intel_crtc *crtc, const struct g4x_wm_values *wm), 176 - TP_ARGS(crtc, wm), 177 - 178 - TP_STRUCT__entry( 179 - __field(enum pipe, pipe) 180 - __field(u32, frame) 181 - __field(u32, scanline) 182 - __field(u16, primary) 183 - __field(u16, sprite) 184 - __field(u16, cursor) 185 - __field(u16, sr_plane) 186 - __field(u16, sr_cursor) 187 - __field(u16, sr_fbc) 188 - __field(u16, hpll_plane) 189 - __field(u16, hpll_cursor) 190 - __field(u16, hpll_fbc) 191 - __field(bool, cxsr) 192 - __field(bool, hpll) 193 - __field(bool, fbc) 194 - ), 195 - 196 - TP_fast_assign( 197 - __entry->pipe = crtc->pipe; 198 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 199 - __entry->scanline = intel_get_crtc_scanline(crtc); 200 - __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; 201 - __entry->sprite = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; 202 - __entry->cursor = wm->pipe[crtc->pipe].plane[PLANE_CURSOR]; 203 - __entry->sr_plane = wm->sr.plane; 204 - __entry->sr_cursor = wm->sr.cursor; 205 - __entry->sr_fbc = wm->sr.fbc; 206 - __entry->hpll_plane = wm->hpll.plane; 207 - __entry->hpll_cursor = wm->hpll.cursor; 208 - __entry->hpll_fbc = wm->hpll.fbc; 209 - __entry->cxsr = wm->cxsr; 210 - __entry->hpll = wm->hpll_en; 211 - __entry->fbc = wm->fbc_en; 212 - ), 213 - 214 - TP_printk("pipe %c, frame=%u, scanline=%u, wm %d/%d/%d, sr %s/%d/%d/%d, hpll %s/%d/%d/%d, fbc %s", 215 - pipe_name(__entry->pipe), __entry->frame, __entry->scanline, 216 - __entry->primary, __entry->sprite, __entry->cursor, 217 - yesno(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc, 218 - yesno(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc, 219 - yesno(__entry->fbc)) 220 - ); 221 - 222 - TRACE_EVENT(vlv_wm, 223 - TP_PROTO(struct intel_crtc *crtc, const struct vlv_wm_values *wm), 224 - TP_ARGS(crtc, wm), 225 - 226 - TP_STRUCT__entry( 227 - __field(enum pipe, pipe) 228 - __field(u32, frame) 229 - __field(u32, scanline) 230 - __field(u32, level) 231 - __field(u32, cxsr) 232 - __field(u32, primary) 233 - __field(u32, sprite0) 234 - __field(u32, sprite1) 235 - __field(u32, cursor) 236 - __field(u32, sr_plane) 237 - __field(u32, sr_cursor) 238 - ), 239 - 240 - TP_fast_assign( 241 - __entry->pipe = crtc->pipe; 242 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 243 - __entry->scanline = intel_get_crtc_scanline(crtc); 244 - __entry->level = wm->level; 245 - __entry->cxsr = wm->cxsr; 246 - __entry->primary = wm->pipe[crtc->pipe].plane[PLANE_PRIMARY]; 247 - __entry->sprite0 = wm->pipe[crtc->pipe].plane[PLANE_SPRITE0]; 248 - __entry->sprite1 = wm->pipe[crtc->pipe].plane[PLANE_SPRITE1]; 249 - __entry->cursor = wm->pipe[crtc->pipe].plane[PLANE_CURSOR]; 250 - __entry->sr_plane = wm->sr.plane; 251 - __entry->sr_cursor = wm->sr.cursor; 252 - ), 253 - 254 - TP_printk("pipe %c, frame=%u, scanline=%u, level=%d, cxsr=%d, wm %d/%d/%d/%d, sr %d/%d", 255 - pipe_name(__entry->pipe), __entry->frame, 256 - __entry->scanline, __entry->level, __entry->cxsr, 257 - __entry->primary, __entry->sprite0, __entry->sprite1, __entry->cursor, 258 - __entry->sr_plane, __entry->sr_cursor) 259 - ); 260 - 261 - TRACE_EVENT(vlv_fifo_size, 262 - TP_PROTO(struct intel_crtc *crtc, u32 sprite0_start, u32 sprite1_start, u32 fifo_size), 263 - TP_ARGS(crtc, sprite0_start, sprite1_start, fifo_size), 264 - 265 - TP_STRUCT__entry( 266 - __field(enum pipe, pipe) 267 - __field(u32, frame) 268 - __field(u32, scanline) 269 - __field(u32, sprite0_start) 270 - __field(u32, sprite1_start) 271 - __field(u32, fifo_size) 272 - ), 273 - 274 - TP_fast_assign( 275 - __entry->pipe = crtc->pipe; 276 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 277 - __entry->scanline = intel_get_crtc_scanline(crtc); 278 - __entry->sprite0_start = sprite0_start; 279 - __entry->sprite1_start = sprite1_start; 280 - __entry->fifo_size = fifo_size; 281 - ), 282 - 283 - TP_printk("pipe %c, frame=%u, scanline=%u, %d/%d/%d", 284 - pipe_name(__entry->pipe), __entry->frame, 285 - __entry->scanline, __entry->sprite0_start, 286 - __entry->sprite1_start, __entry->fifo_size) 287 - ); 288 - 289 - /* plane updates */ 290 - 291 - TRACE_EVENT(intel_plane_update_noarm, 292 - TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 293 - TP_ARGS(plane, crtc), 294 - 295 - TP_STRUCT__entry( 296 - __field(enum pipe, pipe) 297 - __field(u32, frame) 298 - __field(u32, scanline) 299 - __array(int, src, 4) 300 - __array(int, dst, 4) 301 - __string(name, plane->name) 302 - ), 303 - 304 - TP_fast_assign( 305 - __assign_str(name, plane->name); 306 - __entry->pipe = crtc->pipe; 307 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 308 - __entry->scanline = intel_get_crtc_scanline(crtc); 309 - memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); 310 - memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); 311 - ), 312 - 313 - TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, 314 - pipe_name(__entry->pipe), __get_str(name), 315 - __entry->frame, __entry->scanline, 316 - DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), 317 - DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) 318 - ); 319 - 320 - TRACE_EVENT(intel_plane_update_arm, 321 - TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 322 - TP_ARGS(plane, crtc), 323 - 324 - TP_STRUCT__entry( 325 - __field(enum pipe, pipe) 326 - __field(u32, frame) 327 - __field(u32, scanline) 328 - __array(int, src, 4) 329 - __array(int, dst, 4) 330 - __string(name, plane->name) 331 - ), 332 - 333 - TP_fast_assign( 334 - __assign_str(name, plane->name); 335 - __entry->pipe = crtc->pipe; 336 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 337 - __entry->scanline = intel_get_crtc_scanline(crtc); 338 - memcpy(__entry->src, &plane->state->src, sizeof(__entry->src)); 339 - memcpy(__entry->dst, &plane->state->dst, sizeof(__entry->dst)); 340 - ), 341 - 342 - TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, 343 - pipe_name(__entry->pipe), __get_str(name), 344 - __entry->frame, __entry->scanline, 345 - DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), 346 - DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) 347 - ); 348 - 349 - TRACE_EVENT(intel_plane_disable_arm, 350 - TP_PROTO(struct drm_plane *plane, struct intel_crtc *crtc), 351 - TP_ARGS(plane, crtc), 352 - 353 - TP_STRUCT__entry( 354 - __field(enum pipe, pipe) 355 - __field(u32, frame) 356 - __field(u32, scanline) 357 - __string(name, plane->name) 358 - ), 359 - 360 - TP_fast_assign( 361 - __assign_str(name, plane->name); 362 - __entry->pipe = crtc->pipe; 363 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 364 - __entry->scanline = intel_get_crtc_scanline(crtc); 365 - ), 366 - 367 - TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", 368 - pipe_name(__entry->pipe), __get_str(name), 369 - __entry->frame, __entry->scanline) 370 - ); 371 - 372 - /* fbc */ 373 - 374 - TRACE_EVENT(intel_fbc_activate, 375 - TP_PROTO(struct intel_plane *plane), 376 - TP_ARGS(plane), 377 - 378 - TP_STRUCT__entry( 379 - __field(enum pipe, pipe) 380 - __field(u32, frame) 381 - __field(u32, scanline) 382 - ), 383 - 384 - TP_fast_assign( 385 - struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 386 - plane->pipe); 387 - __entry->pipe = crtc->pipe; 388 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 389 - __entry->scanline = intel_get_crtc_scanline(crtc); 390 - ), 391 - 392 - TP_printk("pipe %c, frame=%u, scanline=%u", 393 - pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 394 - ); 395 - 396 - TRACE_EVENT(intel_fbc_deactivate, 397 - TP_PROTO(struct intel_plane *plane), 398 - TP_ARGS(plane), 399 - 400 - TP_STRUCT__entry( 401 - __field(enum pipe, pipe) 402 - __field(u32, frame) 403 - __field(u32, scanline) 404 - ), 405 - 406 - TP_fast_assign( 407 - struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 408 - plane->pipe); 409 - __entry->pipe = crtc->pipe; 410 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 411 - __entry->scanline = intel_get_crtc_scanline(crtc); 412 - ), 413 - 414 - TP_printk("pipe %c, frame=%u, scanline=%u", 415 - pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 416 - ); 417 - 418 - TRACE_EVENT(intel_fbc_nuke, 419 - TP_PROTO(struct intel_plane *plane), 420 - TP_ARGS(plane), 421 - 422 - TP_STRUCT__entry( 423 - __field(enum pipe, pipe) 424 - __field(u32, frame) 425 - __field(u32, scanline) 426 - ), 427 - 428 - TP_fast_assign( 429 - struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), 430 - plane->pipe); 431 - __entry->pipe = crtc->pipe; 432 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 433 - __entry->scanline = intel_get_crtc_scanline(crtc); 434 - ), 435 - 436 - TP_printk("pipe %c, frame=%u, scanline=%u", 437 - pipe_name(__entry->pipe), __entry->frame, __entry->scanline) 438 - ); 439 - 440 - /* pipe updates */ 441 - 442 - TRACE_EVENT(intel_crtc_vblank_work_start, 443 - TP_PROTO(struct intel_crtc *crtc), 444 - TP_ARGS(crtc), 445 - 446 - TP_STRUCT__entry( 447 - __field(enum pipe, pipe) 448 - __field(u32, frame) 449 - __field(u32, scanline) 450 - ), 451 - 452 - TP_fast_assign( 453 - __entry->pipe = crtc->pipe; 454 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 455 - __entry->scanline = intel_get_crtc_scanline(crtc); 456 - ), 457 - 458 - TP_printk("pipe %c, frame=%u, scanline=%u", 459 - pipe_name(__entry->pipe), __entry->frame, 460 - __entry->scanline) 461 - ); 462 - 463 - TRACE_EVENT(intel_crtc_vblank_work_end, 464 - TP_PROTO(struct intel_crtc *crtc), 465 - TP_ARGS(crtc), 466 - 467 - TP_STRUCT__entry( 468 - __field(enum pipe, pipe) 469 - __field(u32, frame) 470 - __field(u32, scanline) 471 - ), 472 - 473 - TP_fast_assign( 474 - __entry->pipe = crtc->pipe; 475 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 476 - __entry->scanline = intel_get_crtc_scanline(crtc); 477 - ), 478 - 479 - TP_printk("pipe %c, frame=%u, scanline=%u", 480 - pipe_name(__entry->pipe), __entry->frame, 481 - __entry->scanline) 482 - ); 483 - 484 - TRACE_EVENT(intel_pipe_update_start, 485 - TP_PROTO(struct intel_crtc *crtc), 486 - TP_ARGS(crtc), 487 - 488 - TP_STRUCT__entry( 489 - __field(enum pipe, pipe) 490 - __field(u32, frame) 491 - __field(u32, scanline) 492 - __field(u32, min) 493 - __field(u32, max) 494 - ), 495 - 496 - TP_fast_assign( 497 - __entry->pipe = crtc->pipe; 498 - __entry->frame = intel_crtc_get_vblank_counter(crtc); 499 - __entry->scanline = intel_get_crtc_scanline(crtc); 500 - __entry->min = crtc->debug.min_vbl; 501 - __entry->max = crtc->debug.max_vbl; 502 - ), 503 - 504 - TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", 505 - pipe_name(__entry->pipe), __entry->frame, 506 - __entry->scanline, __entry->min, __entry->max) 507 - ); 508 - 509 - TRACE_EVENT(intel_pipe_update_vblank_evaded, 510 - TP_PROTO(struct intel_crtc *crtc), 511 - TP_ARGS(crtc), 512 - 513 - TP_STRUCT__entry( 514 - __field(enum pipe, pipe) 515 - __field(u32, frame) 516 - __field(u32, scanline) 517 - __field(u32, min) 518 - __field(u32, max) 519 - ), 520 - 521 - TP_fast_assign( 522 - __entry->pipe = crtc->pipe; 523 - __entry->frame = crtc->debug.start_vbl_count; 524 - __entry->scanline = crtc->debug.scanline_start; 525 - __entry->min = crtc->debug.min_vbl; 526 - __entry->max = crtc->debug.max_vbl; 527 - ), 528 - 529 - TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", 530 - pipe_name(__entry->pipe), __entry->frame, 531 - __entry->scanline, __entry->min, __entry->max) 532 - ); 533 - 534 - TRACE_EVENT(intel_pipe_update_end, 535 - TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end), 536 - TP_ARGS(crtc, frame, scanline_end), 537 - 538 - TP_STRUCT__entry( 539 - __field(enum pipe, pipe) 540 - __field(u32, frame) 541 - __field(u32, scanline) 542 - ), 543 - 544 - TP_fast_assign( 545 - __entry->pipe = crtc->pipe; 546 - __entry->frame = frame; 547 - __entry->scanline = scanline_end; 548 - ), 549 - 550 - TP_printk("pipe %c, frame=%u, scanline=%u", 551 - pipe_name(__entry->pipe), __entry->frame, 552 - __entry->scanline) 553 - ); 554 - 555 - /* frontbuffer tracking */ 556 - 557 - TRACE_EVENT(intel_frontbuffer_invalidate, 558 - TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin), 559 - TP_ARGS(frontbuffer_bits, origin), 560 - 561 - TP_STRUCT__entry( 562 - __field(unsigned int, frontbuffer_bits) 563 - __field(unsigned int, origin) 564 - ), 565 - 566 - TP_fast_assign( 567 - __entry->frontbuffer_bits = frontbuffer_bits; 568 - __entry->origin = origin; 569 - ), 570 - 571 - TP_printk("frontbuffer_bits=0x%08x, origin=%u", 572 - __entry->frontbuffer_bits, __entry->origin) 573 - ); 574 - 575 - TRACE_EVENT(intel_frontbuffer_flush, 576 - TP_PROTO(unsigned int frontbuffer_bits, unsigned int origin), 577 - TP_ARGS(frontbuffer_bits, origin), 578 - 579 - TP_STRUCT__entry( 580 - __field(unsigned int, frontbuffer_bits) 581 - __field(unsigned int, origin) 582 - ), 583 - 584 - TP_fast_assign( 585 - __entry->frontbuffer_bits = frontbuffer_bits; 586 - __entry->origin = origin; 587 - ), 588 - 589 - TP_printk("frontbuffer_bits=0x%08x, origin=%u", 590 - __entry->frontbuffer_bits, __entry->origin) 591 - ); 592 19 593 20 /* object tracking */ 594 21
+1 -1
drivers/gpu/drm/i915/intel_pm.c
··· 36 36 #include "display/intel_atomic_plane.h" 37 37 #include "display/intel_bw.h" 38 38 #include "display/intel_de.h" 39 + #include "display/intel_display_trace.h" 39 40 #include "display/intel_display_types.h" 40 41 #include "display/intel_fb.h" 41 42 #include "display/intel_fbc.h" ··· 48 47 #include "i915_drv.h" 49 48 #include "i915_fixed.h" 50 49 #include "i915_irq.h" 51 - #include "i915_trace.h" 52 50 #include "intel_pcode.h" 53 51 #include "intel_pm.h" 54 52 #include "vlv_sideband.h"