From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
jani.nikula@linux.intel.com, navaremanasi@google.com
Subject: Re: [PATCH 2/6] drm/i915/panel: Preserve Vtotal-Vsync distance while adjusting vtotal
Date: Wed, 3 Jun 2026 15:14:10 +0300 [thread overview]
Message-ID: <aiAakr2-HcKbQoYj@intel.com> (raw)
In-Reply-To: <20260522132511.321540-3-ankit.k.nautiyal@intel.com>
On Fri, May 22, 2026 at 06:55:07PM +0530, Ankit Nautiyal wrote:
> As we increase the vtotal to accommodate lower resfresh rate for fixed
> modes, adjust the vtotal-vsync distance also.
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 20c548eea6da..14c7eea8ccb1 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -237,11 +237,18 @@ int intel_panel_compute_config(struct intel_connector *connector,
>
> drm_mode_copy(adjusted_mode, fixed_mode);
>
> - if (is_vrr && fixed_mode_vrefresh != vrefresh)
> + if (is_vrr && fixed_mode_vrefresh != vrefresh) {
> + int vsync_start_diff = adjusted_mode->vtotal - adjusted_mode->vsync_start;
> + int vsync_end_diff = adjusted_mode->vtotal - adjusted_mode->vsync_end;
I'd probably just drop the "_diff" part from the variable names.
It makes me think of a difference between the vsync pulse in
two modes or something.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> adjusted_mode->vtotal =
> DIV_ROUND_CLOSEST(adjusted_mode->clock * 1000,
> adjusted_mode->htotal * vrefresh);
>
> + adjusted_mode->vsync_start = adjusted_mode->vtotal - vsync_start_diff;
> + adjusted_mode->vsync_end = adjusted_mode->vtotal - vsync_end_diff;
> + }
> +
> drm_mode_set_crtcinfo(adjusted_mode, 0);
>
> return 0;
> --
> 2.45.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-06-03 12:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 13:25 [PATCH 0/6] drm/i915/intel_panel: Fix seamless VRR mode switching for DRRS panels Ankit Nautiyal
2026-05-22 13:25 ` [PATCH 1/6] drm/i915/display: Handle VSYNC timing in LRR path Ankit Nautiyal
2026-06-03 12:13 ` Ville Syrjälä
2026-05-22 13:25 ` [PATCH 2/6] drm/i915/panel: Preserve Vtotal-Vsync distance while adjusting vtotal Ankit Nautiyal
2026-06-03 12:14 ` Ville Syrjälä [this message]
2026-05-22 13:25 ` [PATCH 3/6] drm/i915/intel_panel: Add a helper to get the highest refresh rate mode Ankit Nautiyal
2026-05-22 13:25 ` [PATCH 4/6] drm/i915/intel_panel: Pass crtc_state to intel_panel_compute_config Ankit Nautiyal
2026-05-22 13:25 ` [PATCH 5/6] drm/i915/intel_panel: Use highest refresh rate mode for VRR panels Ankit Nautiyal
2026-05-22 13:25 ` [PATCH 6/6] drm/i915/intel_panel: Refine VRR fixed mode selection for DRRS panels Ankit Nautiyal
2026-05-22 14:38 ` ✓ CI.KUnit: success for drm/i915/intel_panel: Fix seamless VRR mode switching for DRRS panels (rev3) Patchwork
2026-05-22 15:16 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-05-22 17:48 ` ✓ i915.CI.BAT: success " Patchwork
2026-05-22 21:37 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-24 0:07 ` ✗ i915.CI.Full: " Patchwork
2026-06-03 14:38 ` [PATCH 0/6] drm/i915/intel_panel: Fix seamless VRR mode switching for DRRS panels Ville Syrjälä
2026-06-09 3:03 ` Nautiyal, Ankit K
-- strict thread matches above, loose matches on Subject: below --
2026-05-12 13:32 Ankit Nautiyal
2026-05-12 13:32 ` [PATCH 2/6] drm/i915/panel: Preserve Vtotal-Vsync distance while adjusting vtotal Ankit Nautiyal
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=aiAakr2-HcKbQoYj@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=jani.nikula@linux.intel.com \
--cc=navaremanasi@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.