Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, arun.r.murthy@intel.com,
	jani.nikula@linux.intel.com, suraj.kandpal@intel.com,
	Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Subject: [PATCH v7 13/14] drm/i915/dp: Adjust SDP guardband requirement for CMN_SDP_TL
Date: Tue, 15 Sep 2026 22:16:54 +0530	[thread overview]
Message-ID: <20260915164657.3429075-14-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20260915164657.3429075-1-ankit.k.nautiyal@intel.com>

Once CMN_SDP_TL is enabled, GMP/PPS/VSC/VSC_EXT/AS SDPs are no longer
positioned relative to the guardband: they are anchored via
CMN_SDP_TL/CMN_SDP_TL_STGR_CTL instead. As per Bspec 68921, SDP Setup is
0 in this mode, so the old per-packet guardband sizing (based on
GMP/PPS/AS-SDP being enabled) no longer applies for GMP/PPS/VSC/VSC_EXT.

Since we are using the default stagger values for now, size the guardband
such that the max default transmission line can be supported, similar to
when CMN SDP TL is not set:

base   : 2nd line of delayed vblank
GMP    : 2 + GMP_STAGGER
VSC_EXT: 2 + VSC_EXT_STAGGER
VSC    : 2
PPS    : 2 + PPS_STAGGER

SDP Setup = 1 + MAX(GMP, VSC_EXT, VSC, PPS setup lines)

Add intel_dp_get_lines_for_cmn_sdp_tl() and route it via the existing
intel_dp_get_lines_for_sdp().

The AS SDP check in intel_dp_sdp_min_guardband() still adds
vrr.vsync_start + 1 to the guardband, since AS SDP positioning is
unaffected by CMN_SDP_TL.

v2: Add VSC min SDP guardband. (Sashiko)

Bspec: 68921
Assisted-by: Copilot:claude-sonnet-4.5
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 52 ++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 018dc6303dfe..f13f17d67d5a 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -62,6 +62,7 @@
 #include "intel_ddi.h"
 #include "intel_de.h"
 #include "intel_dip.h"
+#include "intel_dip_regs.h"
 #include "intel_display_driver.h"
 #include "intel_display_jiffies.h"
 #include "intel_display_utils.h"
@@ -7348,9 +7349,58 @@ int intel_dp_compute_config_late(struct intel_encoder *encoder,
 	return 0;
 }
 
+static
+int intel_dp_get_lines_for_cmn_sdp_tl(u32 type)
+{
+	u32 stagger_val;
+
+	/*
+	 * Since we are using default stagger values similar to the case
+	 * where CMN SDP TL is not set, the different SDP transmission
+	 * lines are:
+	 * base : 2nd line of delayed vblank:
+	 * GMP : 2 + GMP_STAGGER
+	 * VSC_EXT: 2 + VSC_EXT_STAGGER
+	 * VSC : 2
+	 * PPS : 2 + PPS_STAGGER
+	 *
+	 * SDP Setup = 1 + MAX(GMP, VSC_EXT, VSC, PPS setup lines)
+	 *
+	 * For EMP_AS_SDP_TL guardband should be more than vrr.vsync_start.
+	 */
+
+	switch (type) {
+	case DP_SDP_VSC_EXT_VESA:
+	case DP_SDP_VSC_EXT_CEA:
+		stagger_val = VSC_EXT_STAGGER_DEFAULT;
+		break;
+	case HDMI_PACKET_TYPE_GAMUT_METADATA:
+		stagger_val = GMP_STAGGER_DEFAULT;
+		break;
+	case DP_SDP_PPS:
+		stagger_val = PPS_STAGGER_DEFAULT;
+		break;
+	case DP_SDP_VSC:
+		stagger_val = 0;
+		break;
+	default:
+		return 0;
+	}
+
+	return 1 + 2 + stagger_val;
+}
+
 static
 int intel_dp_get_lines_for_sdp(const struct intel_crtc_state *crtc_state, u32 type)
 {
+	struct intel_display *display = to_intel_display(crtc_state);
+
+	if (type == DP_SDP_ADAPTIVE_SYNC)
+		return crtc_state->vrr.vsync_start + 1;
+
+	if (HAS_COMMON_SDP_TL(display))
+		return intel_dp_get_lines_for_cmn_sdp_tl(type);
+
 	switch (type) {
 	case DP_SDP_VSC_EXT_VESA:
 	case DP_SDP_VSC_EXT_CEA:
@@ -7361,8 +7411,6 @@ int intel_dp_get_lines_for_sdp(const struct intel_crtc_state *crtc_state, u32 ty
 		return 7;
 	case DP_SDP_VSC:
 		return 3;
-	case DP_SDP_ADAPTIVE_SYNC:
-		return crtc_state->vrr.vsync_start + 1;
 	default:
 		break;
 	}
-- 
2.50.1


  parent reply	other threads:[~2026-09-15 17:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-15 16:46 [PATCH v7 00/14] Add support for Common SDP Transmission Line Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 01/14] drm/i915/dip: Add new file to handle Data Island Packet hardware Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 02/14] drm/i915/vrr: Use the helper to write EMP_AS_SDP_TL register Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 03/14] drm/i915/intel_dip: Add check for DP encoder Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 04/14] drm/i915/dip: Add helper to get AS SDP Transmission Line Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 05/14] drm/i915/display: Add crtc state for DIP transmission lines Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 06/14] drm/i915/dip: Store and use AS SDP transmission line from crtc state Ankit Nautiyal
2026-09-15 17:22   ` sashiko-bot
2026-09-16  4:18     ` Nautiyal, Ankit K
2026-09-15 16:46 ` [PATCH v7 07/14] drm/i915/dip_regs: Add register definitions for common SDP Transmission Line Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 08/14] drm/i915/dip: Add HAS_COMMON_SDP_TL macro Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 09/14] drm/i915/dip: Store SDP transmission lines in crtc_state Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 10/14] drm/i915/dp: Introduce helpers to enable/disable CMN SDP Transmission line Ankit Nautiyal
2026-09-15 16:46 ` [PATCH v7 11/14] drm/i915/dip: Enable Common " Ankit Nautiyal
2026-09-15 17:28   ` sashiko-bot
2026-09-16  4:19     ` Nautiyal, Ankit K
2026-09-15 16:46 ` [PATCH v7 12/14] drm/i915/dp: Account VSC SDP in min guardband Ankit Nautiyal
2026-09-16  2:41   ` Kandpal, Suraj
2026-09-15 16:46 ` Ankit Nautiyal [this message]
2026-09-15 16:46 ` [PATCH v7 14/14] drm/i915/display: Dump DIP Transmission lines Ankit Nautiyal
2026-09-15 17:31 ` ✗ CI.checkpatch: warning for Add support for Common SDP Transmission Line (rev7) Patchwork
2026-09-15 17:33 ` ✓ CI.KUnit: success " Patchwork
2026-09-15 18:14 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-15 23:50 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-18  3:54 ` [PATCH v7 00/14] Add support for Common SDP Transmission Line Nautiyal, Ankit K

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=20260915164657.3429075-14-ankit.k.nautiyal@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=suraj.kandpal@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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