From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
jouni.hogander@intel.com
Subject: Re: [PATCH] drm/i915/vrr: Fix transmission line for Adaptive Sync SDP
Date: Thu, 23 Oct 2025 19:57:16 +0300 [thread overview]
Message-ID: <aPpebBQsbjQOfuGo@intel.com> (raw)
In-Reply-To: <fb3a74ae-5b57-477e-8681-11d0ee10747b@intel.com>
On Thu, Oct 23, 2025 at 08:37:14PM +0530, Nautiyal, Ankit K wrote:
>
> On 10/23/2025 8:10 PM, Ville Syrjälä wrote:
> > On Thu, Oct 23, 2025 at 05:57:02PM +0530, Nautiyal, Ankit K wrote:
> >> On 10/23/2025 5:34 PM, Ville Syrjälä wrote:
> >>> On Thu, Oct 23, 2025 at 01:46:14PM +0530, Ankit Nautiyal wrote:
> >>>> Currently the EMP_AS_SDP_TL is set to vrr.vsync_start which is
> >>>> incorrect.
> >>>>
> >>>> As per Bspec:71197 the transmission line must be within the SCL +
> >>>> guardband region. Before guardband optimization, guradband was same as
> >>>> vblank length so EMP_AS_SDP_TL set with vrr.sync_start was falling in
> >>>> this region and it was not giving an issue.
> >>>>
> >>>> Now with optimized guardband, this is falling outside the SCL +
> >>>> guardband region and since the same transmission line is used by VSC SDP
> >>>> also, this results in PSR timeout issues.
> >>>>
> >>>> Further restrictions on the position of the transmission line:
> >>>> For DP/eDP, if there is a set context latency (SCL) window, then it
> >>>> cannot be the first line of SCL
> >>>> For DP/eDP, if there is no SCL window, then it cannot be the first line of
> >>>> the Delayed V. Blank
> >>>>
> >>>> Fix the EMP_AS_SDP_TL to VTOTAL - (delayed vblank_start - SCL + 1)
> >>>> Internally the HW computes the value as VTOTAL - EMP_AS_SDP_TL.
> >>>>
> >>>> Fixes: e1123e617e51 ("drm/i915/vrr: Program EMP_AS_SDP_TL for DP AS SDP")
> >>>> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> >>>> Cc: Jouni Högander <jouni.hogander@intel.com>
> >>>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> >>>> ---
> >>>> drivers/gpu/drm/i915/display/intel_vrr.c | 12 +++++++++---
> >>>> 1 file changed, 9 insertions(+), 3 deletions(-)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> >>>> index 92fb72b56f16..dd81d2133aba 100644
> >>>> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> >>>> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> >>>> @@ -655,18 +655,24 @@ void intel_vrr_set_db_point_and_transmission_line(const struct intel_crtc_state
> >>>> {
> >>>> struct intel_display *display = to_intel_display(crtc_state);
> >>>> enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
> >>>> + const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
> >>>> + int transmission_line;
> >>>>
> >>>> /*
> >>>> * For BMG and LNL+ onwards the EMP_AS_SDP_TL is used for programming
> >>>> * double buffering point and transmission line for VRR packets for
> >>>> * HDMI2.1/DP/eDP/DP->HDMI2.1 PCON.
> >>>> * Since currently we support VRR only for DP/eDP, so this is programmed
> >>>> - * to for Adaptive Sync SDP to Vsync start.
> >>>> + * for Adaptive Sync SDP.
> >>>> */
> >>>> - if (DISPLAY_VERx100(display) == 1401 || DISPLAY_VER(display) >= 20)
> >>>> + if (DISPLAY_VERx100(display) == 1401 || DISPLAY_VER(display) >= 20) {
> >>>> + transmission_line = adjusted_mode->crtc_vtotal - (adjusted_mode->crtc_vblank_start -
> >>>> + crtc_state->set_context_latency +
> >>>> + 1);
> >>>> intel_de_write(display,
> >>>> EMP_AS_SDP_TL(display, cpu_transcoder),
> >>>> - EMP_AS_SDP_DB_TL(crtc_state->vrr.vsync_start));
> >>>> + EMP_AS_SDP_DB_TL(transmission_line));
> >>>> + }
> >>> Pretty sure we are expected to send it at vsync_start.
> >> Hmm.. then do we need to move vsync_start too similar to vblank_start
> >> for optimized guardband?
> > The vsync pulse location is dictated by the timings.
>
> Hmm... then with transmission line set as vsync_start, with a reduced
> guardband we might need to increase the SCL so that vsync_start is more
> or less inside the SCL + guardband.
>
> So, if the panel supports AS_SDP while optimizing the guardband we
> increase the SCL for this.
From the vblank evasion pov the easiest thing would be to make
delayed vblank match vsync start exactly, and then bump SCL up one
line to deal with whatever PSR issue there is. But that wouldn't
allow us to use the max guardband, so I guess not really an option.
So at the very least we do need to allow guardband > vsync_start,
but that actually already has a vblank evasion issue because we
might be past the delayed vblank but not yet at vsync start when
we write the registers. Fixing that for the DSB should be pretty
easy, but for the MMIO path it'll take more thinking...
And the guardband < vsync_start case I guess could be made to work
as well. The MMIO vblank evasion would need to be updated to evade
the SCL window when the AS SDP needs reprogramming (or at least
evade starting from vsync_start). IIRC the DSB vblank evasion
evades the entire SCL window anyway so should already be fine.
But that last point actually means that the deadline for a commit
is anyway defined by the start of SCL, so not sure there's any actual
benefit from stretching the SCL rather than the guardband.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-10-23 16:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 8:16 [PATCH] drm/i915/vrr: Fix transmission line for Adaptive Sync SDP Ankit Nautiyal
2025-10-23 10:35 ` Hogander, Jouni
2025-10-23 12:04 ` Ville Syrjälä
2025-10-23 12:27 ` Nautiyal, Ankit K
2025-10-23 12:45 ` Nautiyal, Ankit K
2025-10-23 14:40 ` Ville Syrjälä
2025-10-23 15:07 ` Nautiyal, Ankit K
2025-10-23 16:57 ` Ville Syrjälä [this message]
2025-10-23 15:08 ` Ville Syrjälä
2025-10-24 4:00 ` Nautiyal, Ankit K
2025-10-24 12:00 ` Ville Syrjälä
2025-10-24 12:39 ` Ville Syrjälä
2025-10-27 11:07 ` Nautiyal, Ankit K
2025-10-23 13:07 ` ✗ i915.CI.BAT: failure for " 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=aPpebBQsbjQOfuGo@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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