All of 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 v2 12/13] drm/i915/dsb: Add tracepoints for DSB commit
Date: Wed,  9 Sep 2026 19:17:29 +0300	[thread overview]
Message-ID: <20260909161730.12969-13-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260909161730.12969-1-ville.syrjala@linux.intel.com>

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

Currently DSB based commits don't leave any breadcrumbs via
tracepoints. Add new intel_dsb_commit and intel_dsb_done
tracepoints that at least indicates when the DSB does something.

We might want to improve this later somehow to have a slightly
better idea what the DSB might end up doing. But at least this
now shows that *something* is happening on the hardware.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 .../drm/i915/display/intel_display_trace.h    | 51 +++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_dsb.c      |  5 ++
 2 files changed, 56 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_trace.h b/drivers/gpu/drm/i915/display/intel_display_trace.h
index 504d105935bc..06cf662931fe 100644
--- a/drivers/gpu/drm/i915/display/intel_display_trace.h
+++ b/drivers/gpu/drm/i915/display/intel_display_trace.h
@@ -22,6 +22,7 @@
 #include "intel_display_core.h"
 #include "intel_display_limits.h"
 #include "intel_display_types.h"
+#include "intel_dsb.h"
 #include "intel_vblank.h"
 
 #define __dev_name_display(display) dev_name((display)->drm->dev)
@@ -681,6 +682,56 @@ TRACE_EVENT(intel_fbc_nuke,
 		      __entry->frame, __entry->scanline)
 );
 
+TRACE_EVENT(intel_dsb_commit,
+	    TP_PROTO(struct intel_crtc *crtc, enum intel_dsb_id dsb_id),
+	    TP_ARGS(crtc, dsb_id),
+
+	    TP_STRUCT__entry(
+			     __string(dev, __dev_name_kms(crtc))
+			     __field(char, pipe_name)
+			     __field(u32, dsb_id)
+			     __field(u32, frame)
+			     __field(u32, scanline)
+			     ),
+
+	    TP_fast_assign(
+			   __assign_str(dev);
+			   __entry->pipe_name = pipe_name(crtc->pipe);
+			   __entry->dsb_id = dsb_id;
+			   __entry->frame = intel_crtc_get_vblank_counter(crtc);
+			   __entry->scanline = intel_get_crtc_scanline(crtc);
+			   ),
+
+	    TP_printk("dev %s, pipe %c, DSB %d, frame=%u, scanline=%u",
+		      __get_str(dev), __entry->pipe_name, __entry->dsb_id,
+		      __entry->frame, __entry->scanline)
+);
+
+TRACE_EVENT(intel_dsb_done,
+	    TP_PROTO(struct intel_crtc *crtc, enum intel_dsb_id dsb_id),
+	    TP_ARGS(crtc, dsb_id),
+
+	    TP_STRUCT__entry(
+			     __string(dev, __dev_name_kms(crtc))
+			     __field(char, pipe_name)
+			     __field(u32, dsb_id)
+			     __field(u32, frame)
+			     __field(u32, scanline)
+			     ),
+
+	    TP_fast_assign(
+			   __assign_str(dev);
+			   __entry->pipe_name = pipe_name(crtc->pipe);
+			   __entry->dsb_id = dsb_id;
+			   __entry->frame = intel_crtc_get_vblank_counter(crtc);
+			   __entry->scanline = intel_get_crtc_scanline(crtc);
+			   ),
+
+	    TP_printk("dev %s, pipe %c, DSB %d, frame=%u, scanline=%u",
+		      __get_str(dev), __entry->pipe_name, __entry->dsb_id,
+		      __entry->frame, __entry->scanline)
+);
+
 TRACE_EVENT(intel_crtc_vblank_work_start,
 	    TP_PROTO(struct intel_crtc *crtc),
 	    TP_ARGS(crtc),
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index 8e01e1eed291..299d778520a2 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -14,6 +14,7 @@
 #include "intel_de.h"
 #include "intel_display_regs.h"
 #include "intel_display_rpm.h"
+#include "intel_display_trace.h"
 #include "intel_display_types.h"
 #include "intel_dsb.h"
 #include "intel_dsb_regs.h"
@@ -982,6 +983,8 @@ void intel_dsb_commit(struct intel_dsb *dsb)
 	intel_de_write_fw(display, DSB_HEAD(pipe, dsb->id),
 			  intel_dsb_head(dsb));
 
+	trace_intel_dsb_commit(crtc, dsb->id);
+
 	intel_de_write_fw(display, DSB_TAIL(pipe, dsb->id),
 			  intel_dsb_tail(dsb));
 }
@@ -1124,6 +1127,8 @@ void intel_dsb_irq_handler(struct intel_display *display,
 		spin_lock(&display->drm->event_lock);
 
 		if (crtc->dsb_event) {
+			trace_intel_dsb_done(crtc, dsb_id);
+
 			/*
 			 * Update vblank counter/timestamp in case it
 			 * hasn't been done yet for this frame.
-- 
2.54.0


  parent reply	other threads:[~2026-09-09 16:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 16:17 [PATCH v2 00/13] drm/i915: Some DSB/flipq stuff Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 01/13] drm/i915: Give up on DSB/flip queue if we fail to allocate the color DSB buffer Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 02/13] drm/i915: Check use_flipq in intel_crtc_needs_vblank_work() Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 03/13] drm/i915: Don't initialize flip queue on pre-LNL Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 04/13] drm/i915: Warn about use_flip==true in MMIO commit codepaths Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 05/13] drm/i915: Refine vblank evasion DSB check Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 06/13] drm/i915: Make intel_crtc_needs_vblank_work() easier on the eye Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 07/13] drm/i915: Extract intel_dsb_supported() Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 08/13] drm/i915: Use intel_dsb_supported() to determine 'use_dsb' Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 09/13] drm/i915: Extract commit_dsb_max_cmds() Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 10/13] drm/i915: Introduce enum intel_commit_type Ville Syrjala
2026-09-09 16:17 ` [PATCH v2 11/13] drm/i915: Carve intel_atomic_commit_type() up a bit Ville Syrjala
2026-09-09 16:17 ` Ville Syrjala [this message]
2026-09-09 16:34   ` [PATCH v2 12/13] drm/i915/dsb: Add tracepoints for DSB commit sashiko-bot
2026-09-10 11:23     ` Ville Syrjälä
2026-09-09 16:17 ` [PATCH v2 13/13] drm/i915/dsb: Add tracepoints for flip queue Ville Syrjala
2026-09-09 16:25 ` ✗ CI.checkpatch: warning for drm/i915: Some DSB/flipq stuff (rev2) Patchwork
2026-09-09 16:27 ` ✓ CI.KUnit: success " Patchwork
2026-09-09 17:11 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-09 17:50 ` ✓ i915.CI.BAT: " Patchwork
2026-09-10  0:25 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-10 10:56 ` ✗ i915.CI.Full: " Patchwork

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=20260909161730.12969-13-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.