Skip to content

Commit

Permalink
drm/i915: Print plane name in fbc tracepoints
Browse files Browse the repository at this point in the history
Print the name of the plane in the fbc tracepoints. As the
pipe<->plane assignment can vary on old hw it's probably
more helpful to see both the plane and the pipe names together.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221111123120.7759-3-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
  • Loading branch information
vsyrjala committed Nov 17, 2022
1 parent b5423d1 commit 2ceea5d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions drivers/gpu/drm/i915/display/intel_display_trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ TRACE_EVENT(intel_fbc_activate,
TP_ARGS(plane),

TP_STRUCT__entry(
__string(name, plane->base.name)
__field(enum pipe, pipe)
__field(u32, frame)
__field(u32, scanline)
Expand All @@ -377,20 +378,23 @@ TRACE_EVENT(intel_fbc_activate,
TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc);
),

TP_printk("pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline)
);

TRACE_EVENT(intel_fbc_deactivate,
TP_PROTO(struct intel_plane *plane),
TP_ARGS(plane),

TP_STRUCT__entry(
__string(name, plane->base.name)
__field(enum pipe, pipe)
__field(u32, frame)
__field(u32, scanline)
Expand All @@ -399,20 +403,23 @@ TRACE_EVENT(intel_fbc_deactivate,
TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc);
),

TP_printk("pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline)
);

TRACE_EVENT(intel_fbc_nuke,
TP_PROTO(struct intel_plane *plane),
TP_ARGS(plane),

TP_STRUCT__entry(
__string(name, plane->base.name)
__field(enum pipe, pipe)
__field(u32, frame)
__field(u32, scanline)
Expand All @@ -421,13 +428,15 @@ TRACE_EVENT(intel_fbc_nuke,
TP_fast_assign(
struct intel_crtc *crtc = intel_crtc_for_pipe(to_i915(plane->base.dev),
plane->pipe);
__assign_str(name, plane->base.name)
__entry->pipe = crtc->pipe;
__entry->frame = intel_crtc_get_vblank_counter(crtc);
__entry->scanline = intel_get_crtc_scanline(crtc);
),

TP_printk("pipe %c, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __entry->frame, __entry->scanline)
TP_printk("pipe %c, plane %s, frame=%u, scanline=%u",
pipe_name(__entry->pipe), __get_str(name),
__entry->frame, __entry->scanline)
);

TRACE_EVENT(intel_crtc_vblank_work_start,
Expand Down

0 comments on commit 2ceea5d

Please sign in to comment.