Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 9/9] drm/i915: Include plane ctl/surf registers in the plane update_arm() tracepoint
Date: Wed,  2 Apr 2025 03:22:09 +0300	[thread overview]
Message-ID: <20250402002209.24987-10-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20250402002209.24987-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The plane fault tracepoints report the plane control and
surface register values. In order to correlate those against the
plane update tracepoints it might be helpful to also include that
information in the plane update tracepoints as well.

The one caveat here is that the precomputed ctl/surf values
that we include the tracepoint do not include the async flip
bit(s) (as those are handled in a more dynamic fashion), whereas
the ones read from the hardware in the plane fault tracepoint
include everything.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 .../gpu/drm/i915/display/intel_atomic_plane.c |  2 +-
 .../drm/i915/display/intel_display_trace.h    | 28 +++++++++++++------
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 264a50b29c16..24bb7ddbb06a 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -834,7 +834,7 @@ void intel_plane_async_flip(struct intel_dsb *dsb,
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
 
-	trace_intel_plane_async_flip(plane, crtc, async_flip);
+	trace_intel_plane_async_flip(plane_state, crtc, async_flip);
 	plane->async_flip(dsb, plane, crtc_state, plane_state, async_flip);
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h
index f0763d754eb7..91980567113d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_trace.h
+++ b/drivers/gpu/drm/i915/display/intel_display_trace.h
@@ -381,16 +381,19 @@ TRACE_EVENT(vlv_fifo_size,
 );
 
 TRACE_EVENT(intel_plane_async_flip,
-	    TP_PROTO(struct intel_plane *plane, struct intel_crtc *crtc, bool async_flip),
-	    TP_ARGS(plane, crtc, async_flip),
+	    TP_PROTO(const struct intel_plane_state *plane_state,
+		     struct intel_crtc *crtc, bool async_flip),
+	    TP_ARGS(plane_state, crtc, async_flip),
 
 	    TP_STRUCT__entry(
-			     __string(dev, __dev_name_kms(plane))
+			     __string(dev, __dev_name_drm(plane_state->uapi.plane))
 			     __field(char, pipe_name)
 			     __field(u32, frame)
 			     __field(u32, scanline)
 			     __field(bool, async_flip)
-			     __string(name, plane->base.name)
+			     __string(name, plane_state->uapi.plane->name)
+			     __field(u32, ctl)
+			     __field(u32, surf)
 			     ),
 
 	    TP_fast_assign(
@@ -400,11 +403,15 @@ TRACE_EVENT(intel_plane_async_flip,
 			   __entry->frame = intel_crtc_get_vblank_counter(crtc);
 			   __entry->scanline = intel_get_crtc_scanline(crtc);
 			   __entry->async_flip = async_flip;
+			   __entry->ctl = plane_state->ctl;
+			   __entry->surf = plane_state->surf;
 			   ),
 
-	    TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, async_flip=%s",
+	    TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, async_flip=%s, ctl=0x%x, surf=0x%x",
 		      __get_str(dev), __entry->pipe_name, __get_str(name),
-		      __entry->frame, __entry->scanline, str_yes_no(__entry->async_flip))
+		      __entry->frame, __entry->scanline,
+		      str_yes_no(__entry->async_flip),
+		      __entry->ctl, __entry->surf)
 );
 
 TRACE_EVENT(intel_plane_update_noarm,
@@ -453,6 +460,8 @@ TRACE_EVENT(intel_plane_update_arm,
 			     __array(int, src, 4)
 			     __array(int, dst, 4)
 			     __string(name, plane_state->uapi.plane->name)
+			     __field(u32, ctl)
+			     __field(u32, surf)
 			     ),
 
 	    TP_fast_assign(
@@ -464,13 +473,16 @@ TRACE_EVENT(intel_plane_update_arm,
 			   __entry->format = plane_state->hw.fb->format->format;
 			   memcpy(__entry->src, &plane_state->uapi.src, sizeof(__entry->src));
 			   memcpy(__entry->dst, &plane_state->uapi.dst, sizeof(__entry->dst));
+			   __entry->ctl = plane_state->ctl;
+			   __entry->surf = plane_state->surf;
 			   ),
 
-	    TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, format=%p4cc, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT,
+	    TP_printk("dev %s, pipe %c, %s, frame=%u, scanline=%u, format=%p4cc, " DRM_RECT_FP_FMT " -> " DRM_RECT_FMT " ctl=0x%x, surf=0x%x",
 		      __get_str(dev), __entry->pipe_name, __get_str(name),
 		      __entry->frame, __entry->scanline, &__entry->format,
 		      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),
+		      __entry->ctl, __entry->surf)
 );
 
 TRACE_EVENT(intel_plane_disable_arm,
-- 
2.45.3


  parent reply	other threads:[~2025-04-02  0:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02  0:22 [PATCH 0/9] drm/i915: Precompute plane SURF address/etc Ville Syrjala
2025-04-02  0:22 ` [PATCH 1/9] drm/i915: Precompute plane SURF address Ville Syrjala
2025-04-02  0:22 ` [PATCH 2/9] drm/i915: Nuke intel_plane_ggtt_offset() Ville Syrjala
2025-04-02  0:22 ` [PATCH 3/9] drm/i915: Move the intel_dpt_offset() check into intel_plane_pin_fb() Ville Syrjala
2025-04-02  0:22 ` [PATCH 4/9] drm/i915: Use i915_vma_offset() in intel_dpt_offset() Ville Syrjala
2025-04-02  0:22 ` [PATCH 5/9] drm/i915: Remove unused dpt_total_entries() Ville Syrjala
2025-04-02  0:22 ` [PATCH 6/9] drm/i915: Don't pass crtc_state to foo_plane_ctl() & co Ville Syrjala
2025-04-02  0:22 ` [PATCH 7/9] drm/i915: Include crtc contributed bits in plane_state->ctl Ville Syrjala
2025-04-02  0:22 ` [PATCH 8/9] drm/i915: Add tracepoint for plane faults Ville Syrjala
2025-04-02  0:22 ` Ville Syrjala [this message]
2025-04-02  1:42 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Precompute plane SURF address/etc Patchwork
2025-04-02  1:42 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-04-02  2:02 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-02  4:33 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-02 15:00   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250402002209.24987-10-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox