From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>,
<intel-gfx@lists.freedesktop.org>
Cc: <intel-xe@lists.freedesktop.org>, <ville.syrjala@linux.intel.com>,
<jani.nikula@intel.com>
Subject: Re: [PATCH v5 2/6] drm/i915/vrr: Compute vrr.vsync_{start, end} during full modeset
Date: Thu, 5 Dec 2024 10:19:32 +0530 [thread overview]
Message-ID: <0d150b3f-b43e-4113-b52a-1e0e984f558b@intel.com> (raw)
In-Reply-To: <20241202024540.2578856-3-mitulkumar.ajitkumar.golani@intel.com>
On 12/2/2024 8:15 AM, Mitul Golani wrote:
> vrr.vsync_{start,end} computation should not depend on
> crtc_state->vrr.enable.
>
> --v1:
> - Explain commit message more clearly [Jani]
> - Instead of tweaking to fastset use vrr.flipline while computing AS_SDP.
> --v2:
> - Correct computation of vrr.vsync_start/end should not depend on
> vrr.enable.[ville]
> - vrr enable disable requirement should not obstruct by SDP enable
> disable requirements. [Ville]
> --v3:
> - Create separate patch for crtc_state_dump [Ankit].
>
> --v4:
> - Update commit message and header [Ankit].
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_vrr.c | 25 ++++++++++--------------
> 1 file changed, 10 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index b386e62d1664..c395af419ce3 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -236,7 +236,7 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
> crtc_state->mode_flags |= I915_MODE_FLAG_VRR;
> }
>
> - if (intel_dp->as_sdp_supported && crtc_state->vrr.enable) {
> + if (HAS_AS_SDP(display)) {
> crtc_state->vrr.vsync_start =
> (crtc_state->hw.adjusted_mode.crtc_vtotal -
> crtc_state->hw.adjusted_mode.vsync_start);
> @@ -316,6 +316,12 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state)
> trans_vrr_ctl(crtc_state));
> intel_de_write(display, TRANS_VRR_FLIPLINE(display, cpu_transcoder),
> crtc_state->vrr.flipline - 1);
> +
> + if (HAS_AS_SDP(display))
> + intel_de_write(display,
> + TRANS_VRR_VSYNC(display, cpu_transcoder),
> + VRR_VSYNC_END(crtc_state->vrr.vsync_end) |
> + VRR_VSYNC_START(crtc_state->vrr.vsync_start));
> }
>
> void intel_vrr_send_push(const struct intel_crtc_state *crtc_state)
> @@ -352,12 +358,6 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state)
> intel_de_write(display, TRANS_PUSH(display, cpu_transcoder),
> TRANS_PUSH_EN);
>
> - if (HAS_AS_SDP(display))
> - intel_de_write(display,
> - TRANS_VRR_VSYNC(display, cpu_transcoder),
> - VRR_VSYNC_END(crtc_state->vrr.vsync_end) |
> - VRR_VSYNC_START(crtc_state->vrr.vsync_start));
> -
> if (crtc_state->cmrr.enable) {
> intel_de_write(display, TRANS_VRR_CTL(display, cpu_transcoder),
> VRR_CTL_VRR_ENABLE | VRR_CTL_CMRR_ENABLE |
> @@ -382,10 +382,6 @@ void intel_vrr_disable(const struct intel_crtc_state *old_crtc_state)
> TRANS_VRR_STATUS(display, cpu_transcoder),
> VRR_STATUS_VRR_EN_LIVE, 1000);
> intel_de_write(display, TRANS_PUSH(display, cpu_transcoder), 0);
> -
> - if (HAS_AS_SDP(display))
> - intel_de_write(display,
> - TRANS_VRR_VSYNC(display, cpu_transcoder), 0);
> }
>
> void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
> @@ -425,10 +421,6 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
> TRANS_VRR_VMAX(display, cpu_transcoder)) + 1;
> crtc_state->vrr.vmin = intel_de_read(display,
> TRANS_VRR_VMIN(display, cpu_transcoder)) + 1;
> - }
> -
> - if (crtc_state->vrr.enable) {
> - crtc_state->mode_flags |= I915_MODE_FLAG_VRR;
>
> if (HAS_AS_SDP(display)) {
> trans_vrr_vsync =
> @@ -440,4 +432,7 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
> REG_FIELD_GET(VRR_VSYNC_END_MASK, trans_vrr_vsync);
> }
> }
> +
> + if (crtc_state->vrr.enable)
> + crtc_state->mode_flags |= I915_MODE_FLAG_VRR;
> }
next prev parent reply other threads:[~2024-12-05 4:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 2:45 [PATCH v5 0/6] Add AS_SDP to fastset Mitul Golani
2024-12-02 2:45 ` [PATCH v5 1/6] drm/i915/vrr: Add crtc_state dump for vrr.vsync params Mitul Golani
2024-12-05 4:48 ` Nautiyal, Ankit K
2024-12-02 2:45 ` [PATCH v5 2/6] drm/i915/vrr: Compute vrr.vsync_{start, end} during full modeset Mitul Golani
2024-12-05 4:49 ` Nautiyal, Ankit K [this message]
2024-12-02 2:45 ` [PATCH v5 3/6] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Mitul Golani
2024-12-02 2:45 ` [PATCH v5 4/6] drm/i915/dp: Compute as_sdp.vtotal based on vrr timings Mitul Golani
2024-12-05 4:50 ` Nautiyal, Ankit K
2024-12-02 2:45 ` [PATCH v5 5/6] drm/i915/dp: Compute as_sdp based on if vrr possible Mitul Golani
2024-12-02 2:45 ` [PATCH v5 6/6] drm/i915/display: Move as sdp params change to fastset Mitul Golani
2024-12-02 2:49 ` ✓ CI.Patch_applied: success for Add AS_SDP to fastset (rev2) Patchwork
2024-12-02 2:49 ` ✓ CI.checkpatch: " Patchwork
2024-12-02 2:50 ` ✓ CI.KUnit: " Patchwork
2024-12-02 3:08 ` ✓ CI.Build: " Patchwork
2024-12-02 3:10 ` ✓ CI.Hooks: " Patchwork
2024-12-02 3:12 ` ✗ CI.checksparse: warning " 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=0d150b3f-b43e-4113-b52a-1e0e984f558b@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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