From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 17/18] drm/i915/dsb: Add support for triggering VRR push with DSB
Date: Fri, 3 Jan 2025 17:47:23 +0530 [thread overview]
Message-ID: <f91df974-3ab1-427e-9b8c-2cff6a1b3a67@intel.com> (raw)
In-Reply-To: <20241210211007.5976-18-ville.syrjala@linux.intel.com>
On 12/11/2024 2:40 AM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We have at least two options for how to do the
> TRANS_PUSH_SEND + commit completion signalling
> with the DSB:
>
> Option A)
> 1. trigger TRANS_PUSH_SEND
> 2. wait for "safe window"
> 3. signal the interrupt
>
> In this cases step 2 should not do anything if we were already
> between vmin and vmax decision boundaries. Otherwise we'll wait
> until the next start of the vblank period.
>
> Option B)
> 1. wait for "safe window"
> 2. trigger TRANS_PUSH_SEND
> 3. signal the interrupt
>
> This option is perhaps a bit less racy, but if we do somehow
> screw up and the wait is a nop but the push gets deferred
> until the next frame then we'll end up completing the commit
> a frame too early.
>
> So for now I'm leaning towards option A since losing the race
> won't have any drastic consequences. To deal with the race we
> can give the DSB a bit more time to start step 2 before the
> hardware has started the vblank termination properly. Often
> times it seems to be fast enough to make it in time even without
> any extra vblank delay (the push is issued somewhere within a
> scanline and it latches on the next scanline).
Makes sense. 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 | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 22b5eacda0f0..4b3199dcbe7a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -2630,6 +2630,14 @@ static int intel_crtc_vblank_delay(const struct intel_crtc_state *crtc_state)
> if (intel_crtc_needs_wa_14015401596(crtc_state))
> vblank_delay = max(vblank_delay, 1);
>
> + /*
> + * Add a minimal vblank delay to make sure the push
> + * doesn't doesn't race with the "wait for safe
> + * window" we use for frame completion with DSB.
> + */
> + if (HAS_VRR(display))
> + vblank_delay = max(vblank_delay, 1);
> +
> return vblank_delay;
> }
>
> @@ -7725,6 +7733,8 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
> intel_crtc_planes_update_arm(new_crtc_state->dsb_commit,
> state, crtc);
>
> + intel_vrr_send_push(new_crtc_state->dsb_commit, new_crtc_state);
> +
> if (!new_crtc_state->dsb_color_vblank) {
> intel_dsb_wait_vblanks(new_crtc_state->dsb_commit, 1);
> intel_dsb_wait_vblank_delay(state, new_crtc_state->dsb_commit);
next prev parent reply other threads:[~2025-01-03 12:17 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 21:09 [PATCH 00/18] drm/i915: DSB+VRR Ville Syrjala
2024-12-10 21:09 ` [PATCH 01/18] drm/i915: Extract intel_crtc_vblank_delay() Ville Syrjala
2025-01-03 11:24 ` Nautiyal, Ankit K
2025-01-09 15:43 ` Ville Syrjälä
2025-01-10 5:09 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 02/18] drm/i915: Check vblank delay validity Ville Syrjala
2025-01-03 11:26 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 03/18] drm/i915: Fix include order Ville Syrjala
2025-01-03 11:27 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 04/18] drm/i915: Introduce intel_vrr_{vmin,vmax}_vtotal() Ville Syrjala
2025-01-03 11:28 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 05/18] drm/i915: Move framestart/etc. state dump to a better spot Ville Syrjala
2025-01-03 11:29 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 06/18] drm/i915: Include the vblank delay in the state dump Ville Syrjala
2025-01-03 11:30 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 07/18] drm/i915/vrr: Improve VRR " Ville Syrjala
2025-01-03 11:31 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 08/18] drm/i915: Include the scanline offset in the " Ville Syrjala
2025-01-03 11:32 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 09/18] drm/i915: Extract intel_mode_vblank_delay() Ville Syrjala
2025-01-03 11:34 ` Nautiyal, Ankit K
2024-12-10 21:09 ` [PATCH 10/18] drm/i915: Consolidate intel_pre_commit_crtc_state() Ville Syrjala
2025-01-03 11:38 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 11/18] drm/i915: Extract intel_crtc_active_timings() Ville Syrjala
2025-01-03 11:42 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 12/18] drm/i915/vrr: Introduce intel_vrr_vblank_delay() Ville Syrjala
2025-01-03 11:48 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 13/18] drm/i915/vrr: Drop the extra vmin adjustment for ADL+ Ville Syrjala
2025-01-03 11:56 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 14/18] drm/i915/vrr: Fix vmin/vmax/flipline on TGL when using vblank delay Ville Syrjala
2025-01-03 12:03 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 15/18] drm/i915/vrr: Add extra vblank delay to estimates Ville Syrjala
2025-01-03 12:13 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 16/18] drm/i915/vrr: Plumb the DSB into intel_vrr_send_push() Ville Syrjala
2025-01-03 12:14 ` Nautiyal, Ankit K
2024-12-10 21:10 ` [PATCH 17/18] drm/i915/dsb: Add support for triggering VRR push with DSB Ville Syrjala
2025-01-03 12:17 ` Nautiyal, Ankit K [this message]
2024-12-10 21:10 ` [PATCH 18/18] drm/i915/dsb: Allow DSB to perform commits when VRR is enabled Ville Syrjala
2025-01-03 12:18 ` Nautiyal, Ankit K
2024-12-10 22:17 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DSB+VRR Patchwork
2024-12-10 22:17 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-12-10 22:30 ` ✓ i915.CI.BAT: success " Patchwork
2024-12-10 23:49 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-13 23:41 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DSB+VRR (rev2) Patchwork
2024-12-13 23:41 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-12-13 23:55 ` ✗ i915.CI.BAT: failure " Patchwork
2025-01-13 16:48 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: DSB+VRR (rev3) Patchwork
2025-01-13 16:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-01-13 17:12 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-15 4:05 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-15 18:11 ` [PATCH 00/18] drm/i915: DSB+VRR Ville Syrjälä
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=f91df974-3ab1-427e-9b8c-2cff6a1b3a67@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@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