From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <jani.nikula@linux.intel.com>,
<mitulkumar.ajitkumar.golani@intel.com>
Subject: Re: [PATCH 19/22] drm/i915/vrr: Allow fixed_rr with pipe joiner
Date: Wed, 5 Mar 2025 15:05:59 +0530 [thread overview]
Message-ID: <58fa066e-2af4-42ac-a9d1-b55547c2d2bf@intel.com> (raw)
In-Reply-To: <Z8dPjugyQ1dPoNdX@intel.com>
On 3/5/2025 12:37 AM, Ville Syrjälä wrote:
> On Tue, Mar 04, 2025 at 01:49:45PM +0530, Ankit Nautiyal wrote:
>> VRR with joiner is currently disabled as it still needs some work to
>> correctly sequence the primary and secondary transcoders. However, we can
>> still use VRR Timing generator in fixed refresh rate for joiner and since
>> it just need to program vrr timings once and does not involve changing
>> timings on the fly. We still need to skip the VRR and LRR for joiner.
>>
>> To achieve this set vrr.in_range to 0 for joiner case, so that we do not
>> try VRR and LRR for the joiner case.
>>
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_vrr.c | 38 +++++++++++++++++++-----
>> 1 file changed, 31 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
>> index 0dfe6220ff4a..2b6d022434d2 100644
>> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
>> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
>> @@ -292,6 +292,9 @@ void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state)
>> if (!intel_vrr_possible(crtc_state))
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
> I don't think this gets called on the secondary crtc anyway.
>
>> +
>> intel_de_write(display, TRANS_VRR_VMIN(display, cpu_transcoder),
>> intel_vrr_fixed_rr_vmin(crtc_state) - 1);
>> intel_de_write(display, TRANS_VRR_VMAX(display, cpu_transcoder),
>> @@ -349,19 +352,23 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
>> if (!HAS_VRR(display))
>> return;
>>
>> - /*
>> - * FIXME all joined pipes share the same transcoder.
>> - * Need to account for that during VRR toggle/push/etc.
>> - */
>> - if (crtc_state->joiner_pipes)
>> - return;
>> -
>> if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE)
>> return;
>>
>> crtc_state->vrr.in_range =
>> intel_vrr_is_in_range(connector, drm_mode_vrefresh(adjusted_mode));
>>
>> + /*
>> + * Allow fixed refresh rate with VRR Timing Generator.
>> + * For now set the vrr.in_range to 0, to allow fixed_rr but skip actual
>> + * VRR and LRR.
>> + * #TODO For actual VRR with joiner, we need to figure out how to
>> + * correctly sequence transcoder level stuff vs. pipe level stuff
>> + * in the commit.
>> + */
>> + if (crtc_state->joiner_pipes)
>> + crtc_state->vrr.in_range = 0;
>> +
>> vmin = intel_vrr_compute_vmin(crtc_state);
>>
>> if (crtc_state->vrr.in_range) {
>> @@ -448,6 +455,8 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state)
>> struct intel_display *display = to_intel_display(crtc_state);
>> enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
> Also shouldn't get called on the secondary.
>
>> /*
>> * This bit seems to have two meanings depending on the platform:
>> * TGL: generate VRR "safe window" for DSB vblank waits
>> @@ -486,6 +495,9 @@ void intel_vrr_send_push(struct intel_dsb *dsb,
>> if (!crtc_state->vrr.enable)
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
>> +
>> if (dsb)
>> intel_dsb_nonpost_start(dsb);
>>
>> @@ -560,6 +572,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
>> if (!crtc_state->vrr.enable)
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
>> +
>> intel_de_write(display, TRANS_VRR_VMIN(display, cpu_transcoder),
>> crtc_state->vrr.vmin - 1);
>> intel_de_write(display, TRANS_VRR_VMAX(display, cpu_transcoder),
>> @@ -590,6 +605,9 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state)
>> if (!old_crtc_state->vrr.enable)
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(old_crtc_state))
>> + return;
> All thosea three cases should be impossible on account of
> vrr.enable==false.
>
>> +
>> if (!intel_vrr_always_use_vrr_tg(display)) {
>> intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
>> trans_vrr_ctl(old_crtc_state));
>> @@ -613,6 +631,9 @@ void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state)
>> if (!intel_vrr_possible(crtc_state))
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
>> +
>> if (!intel_vrr_always_use_vrr_tg(display)) {
>> intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
>> trans_vrr_ctl(crtc_state));
>> @@ -637,6 +658,9 @@ void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state)
>> if (!intel_vrr_possible(crtc_state))
>> return;
>>
>> + if (intel_crtc_is_joiner_secondary(crtc_state))
>> + return;
> And these two again shouldn't be called on the secondary crtc.
>
> So I think you should be able to drop all the
> intel_crtc_is_joiner_secondary() checks from this patch.
Got it. Will drop the secondary check in the next version.
Thanks Ville for the catching the issues, review comments and suggestions.
Will figure out the fix for the warn on and do the suggested changes in
next version.
Regards,
Ankit
>
>> +
>> if (!intel_vrr_always_use_vrr_tg(display)) {
>> intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
>> trans_vrr_ctl(crtc_state));
>> --
>> 2.45.2
next prev parent reply other threads:[~2025-03-05 9:36 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 8:19 [PATCH 00/22] Use VRR timing generator for fixed refresh rate modes Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 01/22] drm/i915/vrr: Remove unwanted comment Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 02/22] drm/i915:vrr: Separate out functions to compute vmin and vmax Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 03/22] drm/i915/vrr: Make helpers for cmrr and vrr timings Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 04/22] drm/i915/vrr: Disable CMRR Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 05/22] drm/i915/vrr: Track vrr.enable only for variable timing Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 06/22] drm/i915/vrr: Use crtc_vtotal for vmin Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 07/22] drm/i915/vrr: Prepare for fixed refresh rate timings Ankit Nautiyal
2025-03-04 18:49 ` Ville Syrjälä
2025-03-05 8:30 ` Nautiyal, Ankit K
2025-03-04 8:19 ` [PATCH 08/22] drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 09/22] drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 10/22] drm/i915/dp_mst: Use VRR Timing generator for DP MST " Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 11/22] drm/i915/display: Disable PSR before disabling VRR Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 12/22] drm/i915/display: Move intel_psr_post_plane_update() at the later Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 13/22] drm/i915/vrr: Refactor condition for computing vmax and LRR Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 14/22] drm/i915/vrr: Always set vrr vmax/vmin/flipline in vrr_{enable/disable} Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 15/22] drm/i915/display: Use fixed_rr timings in modeset sequence Ankit Nautiyal
2025-03-04 18:50 ` Ville Syrjälä
2025-03-05 8:41 ` Nautiyal, Ankit K
2025-03-05 12:53 ` Ville Syrjälä
2025-03-05 14:45 ` Nautiyal, Ankit K
2025-03-04 8:19 ` [PATCH 16/22] drm/i915/vrr: Use fixed timings for platforms that support VRR Ankit Nautiyal
2025-03-04 18:53 ` Ville Syrjälä
2025-03-05 8:46 ` Nautiyal, Ankit K
2025-03-04 8:19 ` [PATCH 17/22] drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset block Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 18/22] drm/i915/display: Use fixed rr timings in intel_set_transcoder_timings_lrr() Ankit Nautiyal
2025-03-04 18:56 ` Ville Syrjälä
2025-03-05 8:52 ` Nautiyal, Ankit K
2025-03-04 8:19 ` [PATCH 19/22] drm/i915/vrr: Allow fixed_rr with pipe joiner Ankit Nautiyal
2025-03-04 19:07 ` Ville Syrjälä
2025-03-05 9:35 ` Nautiyal, Ankit K [this message]
2025-03-04 8:19 ` [PATCH 20/22] drm/i915/vrr: Always use VRR timing generator for MTL+ Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 21/22] drm/i915/display: Add fixed_rr to crtc_state dump Ankit Nautiyal
2025-03-04 8:19 ` [PATCH 22/22] drm/i915/display: Avoid use of VTOTAL.Vtotal bits Ankit Nautiyal
2025-03-04 10:33 ` ✗ Fi.CI.CHECKPATCH: warning for Use VRR timing generator for fixed refresh rate modes (rev11) Patchwork
2025-03-04 10:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-03-04 10:55 ` ✗ i915.CI.BAT: failure " 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=58fa066e-2af4-42ac-a9d1-b55547c2d2bf@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=mitulkumar.ajitkumar.golani@intel.com \
--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