From: Jani Nikula <jani.nikula@linux.intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/display: optimize DP 2.0 sdp split update config
Date: Tue, 08 Aug 2023 16:23:32 +0300 [thread overview]
Message-ID: <877cq5u0q3.fsf@intel.com> (raw)
In-Reply-To: <20230804150339.22012-2-vinod.govindapillai@intel.com>
On Fri, 04 Aug 2023, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote:
> Optimize DP 2 SDP split config update so that DP-MST code
> path can be supported as well.
What's the optimization?
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_audio.c | 6 +++---
> drivers/gpu/drm/i915/display/intel_audio.h | 3 +--
> drivers/gpu/drm/i915/display/intel_ddi.c | 3 ---
> drivers/gpu/drm/i915/display/intel_display.c | 3 +++
> drivers/gpu/drm/i915/display/intel_dp.c | 16 +++++++---------
> drivers/gpu/drm/i915/display/intel_dp.h | 2 ++
> 6 files changed, 16 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 3d9c9b4f27f8..19605264a35c 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -759,10 +759,10 @@ static void ibx_audio_codec_enable(struct intel_encoder *encoder,
> mutex_unlock(&i915->display.audio.mutex);
> }
>
> -void intel_audio_sdp_split_update(struct intel_encoder *encoder,
> - const struct intel_crtc_state *crtc_state)
> +void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state)
> {
> - struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> + struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> enum transcoder trans = crtc_state->cpu_transcoder;
>
> if (HAS_DP20(i915))
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.h b/drivers/gpu/drm/i915/display/intel_audio.h
> index 07d034a981e9..9327954b801e 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.h
> +++ b/drivers/gpu/drm/i915/display/intel_audio.h
> @@ -29,7 +29,6 @@ void intel_audio_cdclk_change_pre(struct drm_i915_private *dev_priv);
> void intel_audio_cdclk_change_post(struct drm_i915_private *dev_priv);
> void intel_audio_init(struct drm_i915_private *dev_priv);
> void intel_audio_deinit(struct drm_i915_private *dev_priv);
> -void intel_audio_sdp_split_update(struct intel_encoder *encoder,
> - const struct intel_crtc_state *crtc_state);
> +void intel_audio_sdp_split_update(const struct intel_crtc_state *crtc_state);
>
> #endif /* __INTEL_AUDIO_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 3cd2191fa794..542bc521669a 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3247,9 +3247,6 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
> if (!intel_crtc_is_bigjoiner_slave(crtc_state))
> intel_ddi_enable_transcoder_func(encoder, crtc_state);
>
> - /* Enable/Disable DP2.0 SDP split config before transcoder */
> - intel_audio_sdp_split_update(encoder, crtc_state);
> -
> intel_enable_transcoder(crtc_state);
>
> intel_crtc_vblank_on(crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 43cba98f7753..54afc559f522 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -402,6 +402,9 @@ void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state)
>
> assert_planes_disabled(crtc);
>
> + /* Enable/Disable DP2.0 SDP split config before transcoder */
> + intel_audio_sdp_split_update(new_crtc_state);
The call belongs in the encoder code. Search for "audio" in
intel_display.c; there's almost nothing.
> +
> /*
> * A pipe without a PLL won't actually be able to drive bits from
> * a plane. On ILK+ the pipe PLLs are integrated, so we don't
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 03675620e3ea..4a5be800715c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2232,17 +2232,15 @@ intel_dp_compute_output_format(struct intel_encoder *encoder,
> return ret;
> }
>
> -static void
> -intel_dp_audio_compute_config(struct intel_encoder *encoder,
> - struct intel_crtc_state *pipe_config,
> - struct drm_connector_state *conn_state)
> +void intel_dp_audio_compute_config(struct intel_crtc_state *pipe_config,
> + struct drm_connector_state *conn_state)
> {
> - struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> + struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
> + struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> struct drm_connector *connector = conn_state->connector;
>
> - pipe_config->sdp_split_enable =
> - intel_dp_has_audio(encoder, conn_state) &&
> - intel_dp_is_uhbr(pipe_config);
> + pipe_config->sdp_split_enable = pipe_config->has_audio &&
> + intel_dp_is_uhbr(pipe_config);
Hmmh, I don't get this.
I guess the neatest thing to do would be to have a single
intel_dp_audio_compute_config() that would do everything needed for DP
and DP MST, as well as call intel_audio_compute_config().
It think it's somewhat confusing that the compute config hooks call both
intel_audio_compute_config() and intel_dp_audio_compute_config(). Seems
like the latter should call the former.
BR,
Jani.
>
> drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n",
> connector->base.id, connector->name,
> @@ -2334,7 +2332,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> adjusted_mode->crtc_clock /= n;
> }
>
> - intel_dp_audio_compute_config(encoder, pipe_config, conn_state);
> + intel_dp_audio_compute_config(pipe_config, conn_state);
>
> intel_link_compute_m_n(output_bpp,
> pipe_config->lane_count,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index 22099de3ca45..1a73820204ae 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -65,6 +65,8 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> struct link_config_limits *limits,
> int timeslots,
> bool recompute_pipe_bpp);
> +void intel_dp_audio_compute_config(struct intel_crtc_state *pipe_config,
> + struct drm_connector_state *conn_state);
> bool intel_dp_has_hdmi_sink(struct intel_dp *intel_dp);
> bool intel_dp_is_edp(struct intel_dp *intel_dp);
> bool intel_dp_is_uhbr(const struct intel_crtc_state *crtc_state);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-08-08 13:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 15:03 [Intel-gfx] [PATCH 0/2] DP2.0 SDP split Vinod Govindapillai
2023-08-04 15:03 ` [Intel-gfx] [PATCH 1/2] drm/i915/display: optimize DP 2.0 sdp split update config Vinod Govindapillai
2023-08-08 13:23 ` Jani Nikula [this message]
2023-08-09 8:12 ` Govindapillai, Vinod
2023-08-04 15:03 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: support DP2.0 SDP split for DP-MST Vinod Govindapillai
2023-08-04 18:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for DP2.0 SDP split Patchwork
2023-08-04 18:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-04 18:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-05 2:15 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=877cq5u0q3.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vinod.govindapillai@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 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.