On Tue, Sep 23, 2025 at 06:40:38PM +0530, Ankit Nautiyal wrote:
> For now guardband is equal to the vblank length so ideally it should be
> computed as difference between the vmin vtotal and vactive. However
> since we are having few lines as SCL, we need to account for this while
> computing the guardband.
> 
> Since the vblank start is moved by SCL lines from the vactive, the delta
> between the vmin vtotal and new vblank start was used to account for this.
> Now that SCL is explicitly tracked using the `set_context_latency` member,
> use it directly in the guardband calculation.
> 
> In the future, when the guardband is shortened or optimized, we may need
> to factor in both the change in the vblank start and SCL lines. For now,
> explicitly accounting for SCL is sufficient.
> 
> Signed-off-by: Ankit Nautiyal <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_vrr.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c 
> b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 698b33b5b326..1b90eaa6a776 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -418,7 +418,9 @@ void intel_vrr_compute_config_late(struct 
> intel_crtc_state *crtc_state)
>               return;
>  
>       crtc_state->vrr.guardband =
> -             crtc_state->vrr.vmin - adjusted_mode->crtc_vblank_start -
> +             crtc_state->vrr.vmin -
> +             adjusted_mode->vdisplay -

Should be adjusted_mode->crtc_vdisplay
                         ^^^^^

With that
Reviewed-by: Ville Syrjälä <[email protected]>


> +             crtc_state->set_context_latency -
>               intel_vrr_extra_vblank_delay(display);
>  
>       if (DISPLAY_VER(display) < 13) {
> -- 
> 2.45.2

-- 
Ville Syrjälä
Intel

Reply via email to