Commit 6b3960b1 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Add device name to display tracepoints

Include dev_name() in the tracpoints so one can filter based on
the device.

Example:
echo 'dev=="0000:00:02.0"' > events/i915/intel_cpu_fifo_underrun/filter

v2: Reduce the magic macros, rebase
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-5-ville.syrjala@linux.intel.comAcked-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 44aad8d0
...@@ -18,11 +18,15 @@ ...@@ -18,11 +18,15 @@
#include "intel_crtc.h" #include "intel_crtc.h"
#include "intel_display_types.h" #include "intel_display_types.h"
#define __dev_name_i915(i915) dev_name((i915)->drm.dev)
#define __dev_name_kms(obj) dev_name((obj)->base.dev->dev)
TRACE_EVENT(intel_pipe_enable, TRACE_EVENT(intel_pipe_enable,
TP_PROTO(struct intel_crtc *crtc), TP_PROTO(struct intel_crtc *crtc),
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__array(u32, frame, 3) __array(u32, frame, 3)
__array(u32, scanline, 3) __array(u32, scanline, 3)
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -30,6 +34,7 @@ TRACE_EVENT(intel_pipe_enable, ...@@ -30,6 +34,7 @@ TRACE_EVENT(intel_pipe_enable,
TP_fast_assign( TP_fast_assign(
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct intel_crtc *it__; struct intel_crtc *it__;
__assign_str(dev, __dev_name_kms(crtc));
for_each_intel_crtc(&dev_priv->drm, it__) { for_each_intel_crtc(&dev_priv->drm, it__) {
__entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__);
__entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__);
...@@ -37,8 +42,8 @@ TRACE_EVENT(intel_pipe_enable, ...@@ -37,8 +42,8 @@ TRACE_EVENT(intel_pipe_enable,
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
), ),
TP_printk("pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", TP_printk("dev %s, pipe %c enable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(dev), pipe_name(__entry->pipe),
__entry->frame[PIPE_A], __entry->scanline[PIPE_A], __entry->frame[PIPE_A], __entry->scanline[PIPE_A],
__entry->frame[PIPE_B], __entry->scanline[PIPE_B], __entry->frame[PIPE_B], __entry->scanline[PIPE_B],
__entry->frame[PIPE_C], __entry->scanline[PIPE_C]) __entry->frame[PIPE_C], __entry->scanline[PIPE_C])
...@@ -49,6 +54,7 @@ TRACE_EVENT(intel_pipe_disable, ...@@ -49,6 +54,7 @@ TRACE_EVENT(intel_pipe_disable,
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__array(u32, frame, 3) __array(u32, frame, 3)
__array(u32, scanline, 3) __array(u32, scanline, 3)
__field(enum pipe, pipe) __field(enum pipe, pipe)
...@@ -57,6 +63,7 @@ TRACE_EVENT(intel_pipe_disable, ...@@ -57,6 +63,7 @@ TRACE_EVENT(intel_pipe_disable,
TP_fast_assign( TP_fast_assign(
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct intel_crtc *it__; struct intel_crtc *it__;
__assign_str(dev, __dev_name_kms(crtc));
for_each_intel_crtc(&dev_priv->drm, it__) { for_each_intel_crtc(&dev_priv->drm, it__) {
__entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__); __entry->frame[it__->pipe] = intel_crtc_get_vblank_counter(it__);
__entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__); __entry->scanline[it__->pipe] = intel_get_crtc_scanline(it__);
...@@ -64,8 +71,8 @@ TRACE_EVENT(intel_pipe_disable, ...@@ -64,8 +71,8 @@ TRACE_EVENT(intel_pipe_disable,
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
), ),
TP_printk("pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", TP_printk("dev %s, pipe %c disable, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(dev), pipe_name(__entry->pipe),
__entry->frame[PIPE_A], __entry->scanline[PIPE_A], __entry->frame[PIPE_A], __entry->scanline[PIPE_A],
__entry->frame[PIPE_B], __entry->scanline[PIPE_B], __entry->frame[PIPE_B], __entry->scanline[PIPE_B],
__entry->frame[PIPE_C], __entry->scanline[PIPE_C]) __entry->frame[PIPE_C], __entry->scanline[PIPE_C])
...@@ -76,6 +83,7 @@ TRACE_EVENT(intel_pipe_crc, ...@@ -76,6 +83,7 @@ TRACE_EVENT(intel_pipe_crc,
TP_ARGS(crtc, crcs), TP_ARGS(crtc, crcs),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -83,16 +91,19 @@ TRACE_EVENT(intel_pipe_crc, ...@@ -83,16 +91,19 @@ TRACE_EVENT(intel_pipe_crc,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
memcpy(__entry->crcs, crcs, sizeof(__entry->crcs)); memcpy(__entry->crcs, crcs, sizeof(__entry->crcs));
), ),
TP_printk("pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u crc=%08x %08x %08x %08x %08x",
pipe_name(__entry->pipe), __entry->frame, __entry->scanline, __get_str(dev), pipe_name(__entry->pipe),
__entry->crcs[0], __entry->crcs[1], __entry->crcs[2], __entry->frame, __entry->scanline,
__entry->crcs[3], __entry->crcs[4]) __entry->crcs[0], __entry->crcs[1],
__entry->crcs[2], __entry->crcs[3],
__entry->crcs[4])
); );
TRACE_EVENT(intel_cpu_fifo_underrun, TRACE_EVENT(intel_cpu_fifo_underrun,
...@@ -100,6 +111,7 @@ TRACE_EVENT(intel_cpu_fifo_underrun, ...@@ -100,6 +111,7 @@ TRACE_EVENT(intel_cpu_fifo_underrun,
TP_ARGS(dev_priv, pipe), TP_ARGS(dev_priv, pipe),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_i915(dev_priv))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -107,13 +119,14 @@ TRACE_EVENT(intel_cpu_fifo_underrun, ...@@ -107,13 +119,14 @@ TRACE_EVENT(intel_cpu_fifo_underrun,
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = pipe; __entry->pipe = pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(dev), pipe_name(__entry->pipe),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -122,6 +135,7 @@ TRACE_EVENT(intel_pch_fifo_underrun, ...@@ -122,6 +135,7 @@ TRACE_EVENT(intel_pch_fifo_underrun,
TP_ARGS(dev_priv, pch_transcoder), TP_ARGS(dev_priv, pch_transcoder),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_i915(dev_priv))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -130,13 +144,14 @@ TRACE_EVENT(intel_pch_fifo_underrun, ...@@ -130,13 +144,14 @@ TRACE_EVENT(intel_pch_fifo_underrun,
TP_fast_assign( TP_fast_assign(
enum pipe pipe = pch_transcoder; enum pipe pipe = pch_transcoder;
struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe); struct intel_crtc *crtc = intel_crtc_for_pipe(dev_priv, pipe);
__assign_str(dev, __dev_name_i915(dev_priv));
__entry->pipe = pipe; __entry->pipe = pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pch transcoder %c, frame=%u, scanline=%u", TP_printk("dev %s, pch transcoder %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(dev), pipe_name(__entry->pipe),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -145,6 +160,7 @@ TRACE_EVENT(intel_memory_cxsr, ...@@ -145,6 +160,7 @@ TRACE_EVENT(intel_memory_cxsr,
TP_ARGS(dev_priv, old, new), TP_ARGS(dev_priv, old, new),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_i915(dev_priv))
__array(u32, frame, 3) __array(u32, frame, 3)
__array(u32, scanline, 3) __array(u32, scanline, 3)
__field(bool, old) __field(bool, old)
...@@ -153,6 +169,7 @@ TRACE_EVENT(intel_memory_cxsr, ...@@ -153,6 +169,7 @@ TRACE_EVENT(intel_memory_cxsr,
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc; struct intel_crtc *crtc;
__assign_str(dev, __dev_name_i915(dev_priv));
for_each_intel_crtc(&dev_priv->drm, crtc) { for_each_intel_crtc(&dev_priv->drm, crtc) {
__entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc); __entry->frame[crtc->pipe] = intel_crtc_get_vblank_counter(crtc);
__entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc); __entry->scanline[crtc->pipe] = intel_get_crtc_scanline(crtc);
...@@ -161,8 +178,8 @@ TRACE_EVENT(intel_memory_cxsr, ...@@ -161,8 +178,8 @@ TRACE_EVENT(intel_memory_cxsr,
__entry->new = new; __entry->new = new;
), ),
TP_printk("%s->%s, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u", TP_printk("dev %s, cxsr %s->%s, pipe A: frame=%u, scanline=%u, pipe B: frame=%u, scanline=%u, pipe C: frame=%u, scanline=%u",
str_on_off(__entry->old), str_on_off(__entry->new), __get_str(dev), str_on_off(__entry->old), str_on_off(__entry->new),
__entry->frame[PIPE_A], __entry->scanline[PIPE_A], __entry->frame[PIPE_A], __entry->scanline[PIPE_A],
__entry->frame[PIPE_B], __entry->scanline[PIPE_B], __entry->frame[PIPE_B], __entry->scanline[PIPE_B],
__entry->frame[PIPE_C], __entry->scanline[PIPE_C]) __entry->frame[PIPE_C], __entry->scanline[PIPE_C])
...@@ -173,6 +190,7 @@ TRACE_EVENT(g4x_wm, ...@@ -173,6 +190,7 @@ TRACE_EVENT(g4x_wm,
TP_ARGS(crtc, wm), TP_ARGS(crtc, wm),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -191,6 +209,7 @@ TRACE_EVENT(g4x_wm, ...@@ -191,6 +209,7 @@ TRACE_EVENT(g4x_wm,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -208,8 +227,9 @@ TRACE_EVENT(g4x_wm, ...@@ -208,8 +227,9 @@ TRACE_EVENT(g4x_wm,
__entry->fbc = wm->fbc_en; __entry->fbc = wm->fbc_en;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, wm %d/%d/%d, sr %s/%d/%d/%d, hpll %s/%d/%d/%d, fbc %s", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u, wm %d/%d/%d, sr %s/%d/%d/%d, hpll %s/%d/%d/%d, fbc %s",
pipe_name(__entry->pipe), __entry->frame, __entry->scanline, __get_str(dev), pipe_name(__entry->pipe),
__entry->frame, __entry->scanline,
__entry->primary, __entry->sprite, __entry->cursor, __entry->primary, __entry->sprite, __entry->cursor,
str_yes_no(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc, str_yes_no(__entry->cxsr), __entry->sr_plane, __entry->sr_cursor, __entry->sr_fbc,
str_yes_no(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc, str_yes_no(__entry->hpll), __entry->hpll_plane, __entry->hpll_cursor, __entry->hpll_fbc,
...@@ -221,6 +241,7 @@ TRACE_EVENT(vlv_wm, ...@@ -221,6 +241,7 @@ TRACE_EVENT(vlv_wm,
TP_ARGS(crtc, wm), TP_ARGS(crtc, wm),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -235,6 +256,7 @@ TRACE_EVENT(vlv_wm, ...@@ -235,6 +256,7 @@ TRACE_EVENT(vlv_wm,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -248,9 +270,10 @@ TRACE_EVENT(vlv_wm, ...@@ -248,9 +270,10 @@ TRACE_EVENT(vlv_wm,
__entry->sr_cursor = wm->sr.cursor; __entry->sr_cursor = wm->sr.cursor;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, level=%d, cxsr=%d, wm %d/%d/%d/%d, sr %d/%d", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u, level=%d, cxsr=%d, wm %d/%d/%d/%d, sr %d/%d",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline, __entry->level, __entry->cxsr, __entry->frame, __entry->scanline,
__entry->level, __entry->cxsr,
__entry->primary, __entry->sprite0, __entry->sprite1, __entry->cursor, __entry->primary, __entry->sprite0, __entry->sprite1, __entry->cursor,
__entry->sr_plane, __entry->sr_cursor) __entry->sr_plane, __entry->sr_cursor)
); );
...@@ -260,6 +283,7 @@ TRACE_EVENT(vlv_fifo_size, ...@@ -260,6 +283,7 @@ TRACE_EVENT(vlv_fifo_size,
TP_ARGS(crtc, sprite0_start, sprite1_start, fifo_size), TP_ARGS(crtc, sprite0_start, sprite1_start, fifo_size),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -269,6 +293,7 @@ TRACE_EVENT(vlv_fifo_size, ...@@ -269,6 +293,7 @@ TRACE_EVENT(vlv_fifo_size,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -277,10 +302,10 @@ TRACE_EVENT(vlv_fifo_size, ...@@ -277,10 +302,10 @@ TRACE_EVENT(vlv_fifo_size,
__entry->fifo_size = fifo_size; __entry->fifo_size = fifo_size;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, %d/%d/%d", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u, %d/%d/%d",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline, __entry->sprite0_start, __entry->frame, __entry->scanline,
__entry->sprite1_start, __entry->fifo_size) __entry->sprite0_start, __entry->sprite1_start, __entry->fifo_size)
); );
TRACE_EVENT(intel_plane_update_noarm, TRACE_EVENT(intel_plane_update_noarm,
...@@ -288,6 +313,7 @@ TRACE_EVENT(intel_plane_update_noarm, ...@@ -288,6 +313,7 @@ TRACE_EVENT(intel_plane_update_noarm,
TP_ARGS(plane, crtc), TP_ARGS(plane, crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -297,6 +323,7 @@ TRACE_EVENT(intel_plane_update_noarm, ...@@ -297,6 +323,7 @@ TRACE_EVENT(intel_plane_update_noarm,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name); __assign_str(name, plane->base.name);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
...@@ -305,8 +332,8 @@ TRACE_EVENT(intel_plane_update_noarm, ...@@ -305,8 +332,8 @@ TRACE_EVENT(intel_plane_update_noarm,
memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst));
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline, __entry->frame, __entry->scanline,
DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src),
DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) DRM_RECT_ARG((const struct drm_rect *)__entry->dst))
...@@ -317,6 +344,7 @@ TRACE_EVENT(intel_plane_update_arm, ...@@ -317,6 +344,7 @@ TRACE_EVENT(intel_plane_update_arm,
TP_ARGS(plane, crtc), TP_ARGS(plane, crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -326,6 +354,7 @@ TRACE_EVENT(intel_plane_update_arm, ...@@ -326,6 +354,7 @@ TRACE_EVENT(intel_plane_update_arm,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name); __assign_str(name, plane->base.name);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
...@@ -334,8 +363,8 @@ TRACE_EVENT(intel_plane_update_arm, ...@@ -334,8 +363,8 @@ TRACE_EVENT(intel_plane_update_arm,
memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst)); memcpy(__entry->dst, &plane->base.state->dst, sizeof(__entry->dst));
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT, TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline, __entry->frame, __entry->scanline,
DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src), DRM_RECT_FP_ARG((const struct drm_rect *)__entry->src),
DRM_RECT_ARG((const struct drm_rect *)__entry->dst)) DRM_RECT_ARG((const struct drm_rect *)__entry->dst))
...@@ -346,6 +375,7 @@ TRACE_EVENT(intel_plane_disable_arm, ...@@ -346,6 +375,7 @@ TRACE_EVENT(intel_plane_disable_arm,
TP_ARGS(plane, crtc), TP_ARGS(plane, crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -353,14 +383,15 @@ TRACE_EVENT(intel_plane_disable_arm, ...@@ -353,14 +383,15 @@ TRACE_EVENT(intel_plane_disable_arm,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name); __assign_str(name, plane->base.name);
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -369,6 +400,7 @@ TRACE_EVENT(intel_fbc_activate, ...@@ -369,6 +400,7 @@ TRACE_EVENT(intel_fbc_activate,
TP_ARGS(plane), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__string(name, plane->base.name) __string(name, plane->base.name)
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
...@@ -378,14 +410,15 @@ TRACE_EVENT(intel_fbc_activate, ...@@ -378,14 +410,15 @@ TRACE_EVENT(intel_fbc_activate,
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe); plane->pipe);
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name) __assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -394,6 +427,7 @@ TRACE_EVENT(intel_fbc_deactivate, ...@@ -394,6 +427,7 @@ TRACE_EVENT(intel_fbc_deactivate,
TP_ARGS(plane), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__string(name, plane->base.name) __string(name, plane->base.name)
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
...@@ -403,14 +437,15 @@ TRACE_EVENT(intel_fbc_deactivate, ...@@ -403,14 +437,15 @@ TRACE_EVENT(intel_fbc_deactivate,
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe); plane->pipe);
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name) __assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -419,6 +454,7 @@ TRACE_EVENT(intel_fbc_nuke, ...@@ -419,6 +454,7 @@ TRACE_EVENT(intel_fbc_nuke,
TP_ARGS(plane), TP_ARGS(plane),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(plane))
__string(name, plane->base.name) __string(name, plane->base.name)
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
...@@ -428,14 +464,15 @@ TRACE_EVENT(intel_fbc_nuke, ...@@ -428,14 +464,15 @@ TRACE_EVENT(intel_fbc_nuke,
TP_fast_assign( TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev), struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe); plane->pipe);
__assign_str(dev, __dev_name_kms(plane));
__assign_str(name, plane->base.name) __assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name), __get_str(dev), pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline) __entry->frame, __entry->scanline)
); );
...@@ -444,20 +481,22 @@ TRACE_EVENT(intel_crtc_vblank_work_start, ...@@ -444,20 +481,22 @@ TRACE_EVENT(intel_crtc_vblank_work_start,
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline) __entry->frame, __entry->scanline)
); );
TRACE_EVENT(intel_crtc_vblank_work_end, TRACE_EVENT(intel_crtc_vblank_work_end,
...@@ -465,20 +504,22 @@ TRACE_EVENT(intel_crtc_vblank_work_end, ...@@ -465,20 +504,22 @@ TRACE_EVENT(intel_crtc_vblank_work_end,
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline) __entry->frame, __entry->scanline)
); );
TRACE_EVENT(intel_pipe_update_start, TRACE_EVENT(intel_pipe_update_start,
...@@ -486,6 +527,7 @@ TRACE_EVENT(intel_pipe_update_start, ...@@ -486,6 +527,7 @@ TRACE_EVENT(intel_pipe_update_start,
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -494,6 +536,7 @@ TRACE_EVENT(intel_pipe_update_start, ...@@ -494,6 +536,7 @@ TRACE_EVENT(intel_pipe_update_start,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc); __entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
...@@ -501,9 +544,10 @@ TRACE_EVENT(intel_pipe_update_start, ...@@ -501,9 +544,10 @@ TRACE_EVENT(intel_pipe_update_start,
__entry->max = crtc->debug.max_vbl; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline, __entry->min, __entry->max) __entry->frame, __entry->scanline,
__entry->min, __entry->max)
); );
TRACE_EVENT(intel_pipe_update_vblank_evaded, TRACE_EVENT(intel_pipe_update_vblank_evaded,
...@@ -511,6 +555,7 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded, ...@@ -511,6 +555,7 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded,
TP_ARGS(crtc), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
...@@ -519,6 +564,7 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded, ...@@ -519,6 +564,7 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded,
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = crtc->debug.start_vbl_count; __entry->frame = crtc->debug.start_vbl_count;
__entry->scanline = crtc->debug.scanline_start; __entry->scanline = crtc->debug.scanline_start;
...@@ -526,9 +572,10 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded, ...@@ -526,9 +572,10 @@ TRACE_EVENT(intel_pipe_update_vblank_evaded,
__entry->max = crtc->debug.max_vbl; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline, __entry->min, __entry->max) __entry->frame, __entry->scanline,
__entry->min, __entry->max)
); );
TRACE_EVENT(intel_pipe_update_end, TRACE_EVENT(intel_pipe_update_end,
...@@ -536,20 +583,22 @@ TRACE_EVENT(intel_pipe_update_end, ...@@ -536,20 +583,22 @@ TRACE_EVENT(intel_pipe_update_end,
TP_ARGS(crtc, frame, scanline_end), TP_ARGS(crtc, frame, scanline_end),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_kms(crtc))
__field(enum pipe, pipe) __field(enum pipe, pipe)
__field(u32, frame) __field(u32, frame)
__field(u32, scanline) __field(u32, scanline)
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_kms(crtc));
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = frame; __entry->frame = frame;
__entry->scanline = scanline_end; __entry->scanline = scanline_end;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("dev %s, pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __get_str(dev), pipe_name(__entry->pipe),
__entry->scanline) __entry->frame, __entry->scanline)
); );
TRACE_EVENT(intel_frontbuffer_invalidate, TRACE_EVENT(intel_frontbuffer_invalidate,
...@@ -558,17 +607,19 @@ TRACE_EVENT(intel_frontbuffer_invalidate, ...@@ -558,17 +607,19 @@ TRACE_EVENT(intel_frontbuffer_invalidate,
TP_ARGS(i915, frontbuffer_bits, origin), TP_ARGS(i915, frontbuffer_bits, origin),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_i915(i915))
__field(unsigned int, frontbuffer_bits) __field(unsigned int, frontbuffer_bits)
__field(unsigned int, origin) __field(unsigned int, origin)
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_i915(i915));
__entry->frontbuffer_bits = frontbuffer_bits; __entry->frontbuffer_bits = frontbuffer_bits;
__entry->origin = origin; __entry->origin = origin;
), ),
TP_printk("frontbuffer_bits=0x%08x, origin=%u", TP_printk("dev %s, frontbuffer_bits=0x%08x, origin=%u",
__entry->frontbuffer_bits, __entry->origin) __get_str(dev), __entry->frontbuffer_bits, __entry->origin)
); );
TRACE_EVENT(intel_frontbuffer_flush, TRACE_EVENT(intel_frontbuffer_flush,
...@@ -577,17 +628,19 @@ TRACE_EVENT(intel_frontbuffer_flush, ...@@ -577,17 +628,19 @@ TRACE_EVENT(intel_frontbuffer_flush,
TP_ARGS(i915, frontbuffer_bits, origin), TP_ARGS(i915, frontbuffer_bits, origin),
TP_STRUCT__entry( TP_STRUCT__entry(
__string(dev, __dev_name_i915(i915))
__field(unsigned int, frontbuffer_bits) __field(unsigned int, frontbuffer_bits)
__field(unsigned int, origin) __field(unsigned int, origin)
), ),
TP_fast_assign( TP_fast_assign(
__assign_str(dev, __dev_name_i915(i915));
__entry->frontbuffer_bits = frontbuffer_bits; __entry->frontbuffer_bits = frontbuffer_bits;
__entry->origin = origin; __entry->origin = origin;
), ),
TP_printk("frontbuffer_bits=0x%08x, origin=%u", TP_printk("dev %s, frontbuffer_bits=0x%08x, origin=%u",
__entry->frontbuffer_bits, __entry->origin) __get_str(dev), __entry->frontbuffer_bits, __entry->origin)
); );
#endif /* __INTEL_DISPLAY_TRACE_H__ */ #endif /* __INTEL_DISPLAY_TRACE_H__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment