From: Jani Nikula <jani.nikula@linux.intel.com>
To: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, imre.deak@intel.com
Subject: Re: [PATCH 1/2] drm/i915/display: Avoid reading as sdp caps during each atomic commit
Date: Tue, 02 Jul 2024 11:15:03 +0300 [thread overview]
Message-ID: <87le2k9pmg.fsf@intel.com> (raw)
In-Reply-To: <20240702050755.2091221-2-mitulkumar.ajitkumar.golani@intel.com>
On Tue, 02 Jul 2024, Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> wrote:
> Add new member to struct intel_dp to cache support of Adaptive Sync
> SDP capabilities and use it whenever required to avoid HW access
> to read capability during each atomic commit.
Every commit must work. This breaks adaptive sync. Nothing sets
intel_dp->as_sdp_supported.
Just squash the two patches together.
BR,
Jani.
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_alpm.c | 2 +-
> drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
> drivers/gpu/drm/i915/display/intel_dp.c | 3 +--
> drivers/gpu/drm/i915/display/intel_vrr.c | 3 +--
> 4 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
> index 866b3b409c4d..f4f05a859379 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -280,7 +280,7 @@ void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
> if (DISPLAY_VER(i915) < 20)
> return;
>
> - if (!intel_dp_as_sdp_supported(intel_dp))
> + if (!intel_dp->as_sdp_supported)
> return;
>
> if (crtc_state->has_psr)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 8713835e2307..a9d2acdc51a4 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1806,6 +1806,7 @@ struct intel_dp {
>
> /* connector directly attached - won't be use for modeset in mst world */
> struct intel_connector *attached_connector;
> + bool as_sdp_supported;
>
> struct drm_dp_tunnel *tunnel;
> bool tunnel_suspended:1;
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 3903f6ead6e6..c6f0a46a0388 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2625,8 +2625,7 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
> const struct drm_display_mode *adjusted_mode =
> &crtc_state->hw.adjusted_mode;
>
> - if (!crtc_state->vrr.enable ||
> - !intel_dp_as_sdp_supported(intel_dp))
> + if (!crtc_state->vrr.enable || intel_dp->as_sdp_supported)
> return;
>
> crtc_state->infoframes.enable |= intel_hdmi_infoframe_enable(DP_SDP_ADAPTIVE_SYNC);
> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index 5a0da64c7db3..7e1d9c718214 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -233,8 +233,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(intel_dp) &&
> - crtc_state->vrr.enable) {
> + if (intel_dp->as_sdp_supported && crtc_state->vrr.enable) {
> crtc_state->vrr.vsync_start =
> (crtc_state->hw.adjusted_mode.crtc_vtotal -
> crtc_state->hw.adjusted_mode.vsync_start);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-07-02 8:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 5:07 [PATCH 0/2] Cache SDP caps during connector detection Mitul Golani
2024-07-02 5:07 ` [PATCH 1/2] drm/i915/display: Avoid reading as sdp caps during each atomic commit Mitul Golani
2024-07-02 8:15 ` Jani Nikula [this message]
2024-07-02 5:07 ` [PATCH 2/2] drm/i915/display: Cache Adaptive Sync SDP caps Mitul Golani
2024-07-02 8:08 ` ✗ Fi.CI.SPARSE: warning for Cache SDP caps during connector detection Patchwork
2024-07-02 8:17 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-02 20:16 ` ✓ Fi.CI.IGT: " 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=87le2k9pmg.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mitulkumar.ajitkumar.golani@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;
as well as URLs for NNTP newsgroup(s).