Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <intel-xe@lists.freedesktop.org>, <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v5 11/12] drm/i915/dip: Enable Common SDP Transmission line
Date: Thu, 10 Sep 2026 10:19:46 +0530	[thread overview]
Message-ID: <7ee1a166-bab9-497c-adf4-2872c2f6668f@intel.com> (raw)
In-Reply-To: <20260908071133.82E681F00A3D@smtp.kernel.org>


On 9/8/2026 12:41 PM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [High] Integer underflow when computing cmn_sdp_tl with guardband=0 causes a kernel warning, and a valid transmission line of 0 is incorrectly treated as 'disabled'.
> - [Medium] Per-transcoder SDP transmission line programming is incorrectly placed in port-level enable/disable paths, breaking DP MST secondary streams.
> --
>
> commit dcefae9ad5800e7d0f8f1d55a58dfb400880ed28
> Author: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>
> drm/i915/dip: Enable Common SDP Transmission line
>
> This commit enables programming of the common SDP transmission line on
> platforms that support it. It computes and programs the common base
> transmission line and per-SDP stagger values from the crtc state during
> modeset, and disables the feature on pipe disable.
>
>> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
>> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
>> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
>> @@ -2737,6 +2737,8 @@ static void mtl_ddi_pre_enable_dp(struct intel_atomic_state *state,
>>   	/* 6.o Configure and enable FEC if needed */
>>   	intel_ddi_enable_fec(encoder, crtc_state);
>>   
>> +	intel_dip_cmn_sdp_transmission_line_enable(crtc_state);
>> +
> [Severity: Medium]
> Since mtl_ddi_pre_enable_dp() acts at the port level and only executes for
> the first stream in a DP MST topology, will secondary streams' transcoders
> miss having their SDP transmission line initialized?
>
> It seems MST secondary streams will bypass this hook entirely. Furthermore,
> mst_stream_compute_config_late() in intel_dp_mst.c doesn't appear to call
> intel_dip_cmn_sdp_tl_compute_config_late(), meaning the values aren't
> computed for MST streams.

VRR is not set for MST yet so we are covered.


>
>>   	/* 7.a 128b/132b SST. */
>>   	if (!is_mst && intel_dp_is_uhbr(crtc_state)) {
>>   		/* VCPID 1, start slot 0 for 128b/132b, tu slots */
> [ ... ]
>> @@ -3124,6 +3126,7 @@ static void intel_ddi_buf_disable(struct intel_encoder *encoder,
>>   			     DP_TP_CTL_ENABLE, 0);
>>   	}
>>   
>> +	intel_dip_cmn_sdp_transmission_line_disable(crtc_state);
> [Severity: Medium]
> Similarly, since this port-level disable hook only executes when the last
> stream is disabled, does this leave the transmission line registers active
> for other transcoders in an MST setup when they are individually disabled?
>
>>   	intel_ddi_disable_fec(encoder, crtc_state);
>>   
>>   	if (DISPLAY_VER(display) < 14)
>> diff --git a/drivers/gpu/drm/i915/display/intel_dip.c b/drivers/gpu/drm/i915/display/intel_dip.c
>> --- a/drivers/gpu/drm/i915/display/intel_dip.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dip.c
> [ ... ]
>> +static
>> +void intel_dip_cmn_sdp_tl_compute_config_late(struct intel_crtc_state *crtc_state)
>> +{
> [ ... ]
>> +	if (as_sdp)
>> +		crtc_state->dip.cmn_sdp_tl = crtc_state->dip.emp_as_sdp_tl;
>> +	else
>> +		crtc_state->dip.cmn_sdp_tl = crtc_state->vrr.guardband - 1;
> [Severity: High]
> If crtc_state->vrr.guardband is 0 (for example, when VRR is not used), will
> this subtraction underflow and set the u16 cmn_sdp_tl to 65535?
>
> If it underflows to 65535, pps_stagger evaluates to a negative value
> (0 - 65535) in intel_dip_cmn_sdp_transmission_line_enable(). Will this trigger
> the drm_WARN_ON(display->drm, pps_stagger < 0) and abort enabling the
> transmission line?
>
> Also, if guardband evaluates to 1, cmn_sdp_tl will be 0. Does the
> !crtc_state->dip.cmn_sdp_tl check in intel_dip_cmn_sdp_transmission_line_enable()
> and disable() incorrectly treat a valid transmission line value of 0 as a
> sentinel for 'feature disabled', silently skipping the hardware enablement?


guardband can't be 0 or 1 here. DP always computes it via the optimized 
guardband path (intel_vrr_compute_optimized_guardband()), which calls 
intel_dp_sdp_min_guardband(crtc_state, true) with assume_all_enabled = true.

That guarantees a floor of at least 8 (GMP's contribution), regardless 
of which SDPs are actually active, so no underflow is possible.

That said, this does need to change once CMN_SDP_TL is set: with 
CMN_SDP_TL enabled, the per-packet minimum SDP guardband requirement no 
longer applies.

I'll set a 5-line floor for the guardband in that case, 4 lines to cover 
the packet types plus 1 extra.

Thanks & Regards,

Ankit

>

  reply	other threads:[~2026-09-10  4:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  6:22 [PATCH v5 00/12] Add support for Common SDP Transmission Line Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 01/12] drm/i915/dip: Add new file to handle Data Island Packet hardware Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 02/12] drm/i915/vrr: Use the helper to write EMP_AS_SDP_TL register Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 03/12] drm/i915/intel_dip: Add check for DP encoder Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 04/12] drm/i915/dip: Add helper to get AS SDP Transmission Line Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 05/12] drm/i915/display: Add crtc state for DIP transmission lines Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 06/12] drm/i915/dip: Store and use AS SDP transmission line from crtc state Ankit Nautiyal
2026-09-08  7:09   ` sashiko-bot
2026-09-10  2:47     ` Nautiyal, Ankit K
2026-09-08  6:22 ` [PATCH v5 07/12] drm/i915/dip_regs: Add register definitions for common SDP Transmission Line Ankit Nautiyal
2026-09-08  7:49   ` Kandpal, Suraj
2026-09-08  6:22 ` [PATCH v5 08/12] drm/i915/dip: Add HAS_COMMON_SDP_TL macro Ankit Nautiyal
2026-09-08  6:22 ` [PATCH v5 09/12] drm/i915/dip: Store SDP transmission lines in crtc_state Ankit Nautiyal
2026-09-08  7:50   ` Kandpal, Suraj
2026-09-08  6:22 ` [PATCH v5 10/12] drm/i915/dp: Introduce helpers to enable/disable CMN SDP Transmission line Ankit Nautiyal
2026-09-08  7:12   ` sashiko-bot
2026-09-10  2:48     ` Nautiyal, Ankit K
2026-09-08  6:22 ` [PATCH v5 11/12] drm/i915/dip: Enable Common " Ankit Nautiyal
2026-09-08  7:11   ` sashiko-bot
2026-09-10  4:49     ` Nautiyal, Ankit K [this message]
2026-09-08  8:10   ` Kandpal, Suraj
2026-09-10  4:54     ` Nautiyal, Ankit K
2026-09-08  6:22 ` [PATCH v5 12/12] drm/i915/display: Dump DIP Transmission lines Ankit Nautiyal
2026-09-08  8:03   ` Kandpal, Suraj
2026-09-08  9:52 ` ✗ i915.CI.BAT: failure for Add support for Common SDP Transmission Line (rev5) 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=7ee1a166-bab9-497c-adf4-2872c2f6668f@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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