intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	<intel-gfx@lists.freedesktop.org>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 01/22] drm/i915/vrr: Fix intel_vrr_always_use_vrr_tg()==true on TGL
Date: Fri, 24 Oct 2025 18:54:59 +0530	[thread overview]
Message-ID: <d0af2963-279d-4e9f-a50c-c8df84fc5288@intel.com> (raw)
In-Reply-To: <20251020185038.4272-2-ville.syrjala@linux.intel.com>


On 10/21/2025 12:20 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> On TGL the hardware always needs TRANS_VBLANK.VBLANK_START
> to be programemd with VACTIVE+SCL. Make it so.
>
> The current way of programming it with crtc_vblank_start only
> works for the legacy timing generator, as there the delayed
> vblank does happen exactly at VACTIVE+SCL.
>
> But if one tries to change intel_vrr_always_use_vrr_tg() to
> always use the VRR timing generator on TGL, crtc_vblank_start
> will point to the VRR timing generator's delayed vblank,
> which may not match VACTIVE+SCL.
>
> Fortunately the state checker caught the issue right away
> when I tried intel_vrr_always_use_vrr_tg()==true on TGL.

Hmm. TGL doesn't have SCL register, and still needs Vblank.start.
So irrespective of VRR TG or Legacy TG it needs this value.
Readout for vblank.start temporarily sets 
adjusted_mode->crtc_vblank_start to  vactive + SCL,
we use it for deriving crtc_state->set_context_latency and then 
adjusted_mode->crtc_vblank_start gets overwritten to point to delayed 
vblank, and everything falls in place.

LGTM

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_display.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index a8b4619de347..09d3eb422ad4 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -2631,6 +2631,9 @@ static void intel_set_transcoder_timings(const struct intel_crtc_state *crtc_sta
>   		 * to make it stand out in register dumps.
>   		 */
>   		crtc_vblank_start = 1;
> +	} else if (DISPLAY_VER(display) == 12) {
> +		/* VBLANK_START - VACTIVE defines SCL on TGL */
> +		crtc_vblank_start = crtc_vdisplay + crtc_state->set_context_latency;
>   	}
>   
>   	if (DISPLAY_VER(display) >= 4)
> @@ -2721,6 +2724,9 @@ static void intel_set_transcoder_timings_lrr(const struct intel_crtc_state *crtc
>   		 * to make it stand out in register dumps.
>   		 */
>   		crtc_vblank_start = 1;
> +	} else if (DISPLAY_VER(display) == 12) {
> +		/* VBLANK_START - VACTIVE defines SCL on TGL */
> +		crtc_vblank_start = crtc_vdisplay + crtc_state->set_context_latency;
>   	}
>   
>   	/*

  reply	other threads:[~2025-10-24 13:25 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 18:50 [PATCH 00/22] drm/i915/vrr: A few fixes and a bunch of cleanup Ville Syrjala
2025-10-20 18:50 ` [PATCH 01/22] drm/i915/vrr: Fix intel_vrr_always_use_vrr_tg()==true on TGL Ville Syrjala
2025-10-24 13:24   ` Nautiyal, Ankit K [this message]
2025-10-20 18:50 ` [PATCH 02/22] drm/i915/lrr: Include SCL in lrr_params_changed() Ville Syrjala
2025-10-24 13:25   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 03/22] drm/i915: Remove the "vblank delay" state dump Ville Syrjala
2025-10-24 13:26   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 04/22] drm/i915/vrr: Compute fixed refresh rate timings the sam way as CMRR timings Ville Syrjala
2025-10-24 13:27   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 05/22] drm/i915/vrr: Reorganize intel_vrr_compute_cmrr_timings() a bit Ville Syrjala
2025-10-24 13:28   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 06/22] drm/i195/vrr: Move crtc_state->vrr.{vmin, vmax} update into intel_vrr_compute_vrr_timings() Ville Syrjala
2025-10-24 13:28   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 07/22] drm/i915/vrr: Move compute_fixed_rr_timings() Ville Syrjala
2025-10-24 13:29   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 08/22] drm/i915/vrr: Extract intel_vrr_set_vrr_timings() Ville Syrjala
2025-10-24 13:30   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 09/22] drm/i915/vrr: Avoid redundant TRANS_PUSH write in intel_vrr_enable() Ville Syrjala
2025-10-24 13:30   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 10/22] drm/i915/vrr: Move EMP_AS_SDP_TL write into intel_vrr_set_transcoder_timings() Ville Syrjala
2025-10-24 13:39   ` Nautiyal, Ankit K
2025-10-24 13:51     ` Ville Syrjälä
2025-10-20 18:50 ` [PATCH 11/22] drm/i915/vrr: Use trans_vrr_ctl() in intel_vrr_transcoder_disable() Ville Syrjala
2025-10-24 13:45   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 12/22] drm/i915/vrr: Extract intel_vrr_tg_disable() Ville Syrjala
2025-10-24 13:45   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 13/22] drm/i915/vrr: Extract intel_vrr_tg_enable() Ville Syrjala
2025-10-24 14:10   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 14/22] drm/i915/vrr: Disable VRR TG in intel_vrr_transcoder_disable() only on always use_vrr_tg() platforms Ville Syrjala
2025-10-24 14:10   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 15/22] drm/i915/vrr: Always write TRANS_VRR_CTL in intel_vrr_set_transcoder_timings() on !always_use_vrr_tg() Ville Syrjala
2025-10-24 14:11   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 16/22] drm/i915/vrr: Remove redundant HAS_VRR() checks Ville Syrjala
2025-10-24 14:12   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 17/22] drm/i915/vrr: Move HAS_VRR() check into intel_vrr_set_transcoder_timings() Ville Syrjala
2025-10-24 14:14   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 18/22] drm/i915/vrr: s/crtc_state/old_crtc_state/ in intel_vrr_transcoder_disable() Ville Syrjala
2025-10-24 14:17   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 19/22] drm/i915/vrr: Nuke intel_vrr_vblank_exit_length() Ville Syrjala
2025-10-24 14:18   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 20/22] drm/i915/vrr: Nuke intel_vrr_vmin_flipline() Ville Syrjala
2025-10-24 14:20   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 21/22] drm/i915/vrr: Update the intel_vrr_extra_vblank_delay() comment Ville Syrjala
2025-10-24 14:21   ` Nautiyal, Ankit K
2025-10-20 18:50 ` [PATCH 22/22] drm/i915/vrr: Check HAS_VRR() first in intel_vrr_is_capable() Ville Syrjala
2025-10-24 14:23   ` Nautiyal, Ankit K
2025-10-21  0:33 ` ✓ i915.CI.BAT: success for drm/i915/vrr: A few fixes and a bunch of cleanup Patchwork
2025-10-21  8:21 ` [PATCH 00/22] " Jani Nikula
2025-10-21 15:21 ` ✗ i915.CI.Full: 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=d0af2963-279d-4e9f-a50c-c8df84fc5288@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --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;
as well as URLs for NNTP newsgroup(s).