From: Ville Syrjälä <ville.syrj...@linux.intel.com> When analying plane faults the exact sequence/timing of things can be important. Add a tracepoint for plane faults that can then be correclated against other tracepoints to figure out what happened and when.
Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com> --- .../gpu/drm/i915/display/intel_display_irq.c | 2 ++ .../drm/i915/display/intel_display_trace.h | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c index d2a35e3630b1..d8bd06410542 100644 --- a/drivers/gpu/drm/i915/display/intel_display_irq.c +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c @@ -87,6 +87,8 @@ static bool handle_plane_fault(struct intel_crtc *crtc, enum plane_id plane_id) plane->capture_error(crtc, plane, &error); + trace_intel_plane_fault(plane, crtc, error.ctl, error.surf, error.surflive); + drm_err_ratelimited(display->drm, "[CRTC:%d:%s][PLANE:%d:%s] fault (CTL=0x%x, SURF=0x%x, SURFLIVE=0x%x)\n", crtc->base.base.id, crtc->base.name, diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h index 27ebc32cb61a..f0763d754eb7 100644 --- a/drivers/gpu/drm/i915/display/intel_display_trace.h +++ b/drivers/gpu/drm/i915/display/intel_display_trace.h @@ -498,6 +498,39 @@ TRACE_EVENT(intel_plane_disable_arm, __entry->frame, __entry->scanline) ); +TRACE_EVENT(intel_plane_fault, + TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc, + u32 ctl, u32 surf, u32 surflive), + TP_ARGS(plane, crtc, ctl, surf, surflive), + + TP_STRUCT__entry( + __string(dev, __dev_name_kms(plane)) + __field(char, pipe_name) + __string(name, plane->base.name) + __field(u32, frame) + __field(u32, scanline) + __field(u32, ctl) + __field(u32, surf) + __field(u32, surflive) + ), + + TP_fast_assign( + __assign_str(dev); + __assign_str(name); + __entry->pipe_name = pipe_name(crtc->pipe); + __entry->frame = intel_crtc_get_vblank_counter(crtc); + __entry->scanline = intel_get_crtc_scanline(crtc); + __entry->ctl = ctl; + __entry->surf = surf; + __entry->surflive = surflive; + ), + + TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u ctl=0x%x, surf=0x%x, surflive=0x%x", + __get_str(dev), __entry->pipe_name, __get_str(name), + __entry->frame, __entry->scanline, + __entry->ctl, __entry->surf, __entry->surflive) +); + TRACE_EVENT(intel_plane_scaler_update_arm, TP_PROTO(struct intel_plane *plane, int scaler_id, int x, int y, int w, int h), -- 2.45.3