From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 04/11] drm/i915: Push audio enable/disable further out
Date: Mon, 13 Nov 2023 17:35:48 +0200 [thread overview]
Message-ID: <875y25vf6z.fsf@intel.com> (raw)
In-Reply-To: <20231106211915.13406-5-ville.syrjala@linux.intel.com>
On Mon, 06 Nov 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Push the audio enable/disable to be the last/first thing
> respectively that is done in the encoder enable/disable hooks.
> The goal is to move it further out of these encoder hooks entirely.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/g4x_dp.c | 8 ++++----
> drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++++--------
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 8 ++++----
> 3 files changed, 12 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/g4x_dp.c b/drivers/gpu/drm/i915/display/g4x_dp.c
> index e8ee0a08947e..79ef2b435beb 100644
> --- a/drivers/gpu/drm/i915/display/g4x_dp.c
> +++ b/drivers/gpu/drm/i915/display/g4x_dp.c
> @@ -482,10 +482,10 @@ static void intel_disable_dp(struct intel_atomic_state *state,
> {
> struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>
> - intel_dp->link_trained = false;
> -
> intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state);
>
> + intel_dp->link_trained = false;
> +
> /*
> * Make sure the panel is off before trying to change the mode.
> * But also ensure that we have vdd while we switch off the panel.
> @@ -686,8 +686,8 @@ static void g4x_enable_dp(struct intel_atomic_state *state,
> const struct drm_connector_state *conn_state)
> {
> intel_enable_dp(state, encoder, pipe_config, conn_state);
> - intel_audio_codec_enable(encoder, pipe_config, conn_state);
> intel_edp_backlight_on(pipe_config, conn_state);
> + intel_audio_codec_enable(encoder, pipe_config, conn_state);
> }
>
> static void vlv_enable_dp(struct intel_atomic_state *state,
> @@ -695,8 +695,8 @@ static void vlv_enable_dp(struct intel_atomic_state *state,
> const struct intel_crtc_state *pipe_config,
> const struct drm_connector_state *conn_state)
> {
> - intel_audio_codec_enable(encoder, pipe_config, conn_state);
> intel_edp_backlight_on(pipe_config, conn_state);
> + intel_audio_codec_enable(encoder, pipe_config, conn_state);
> }
>
> static void g4x_pre_enable_dp(struct intel_atomic_state *state,
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index c75fd00e360a..3c2360e2fa43 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3110,8 +3110,6 @@ static void intel_enable_ddi_dp(struct intel_atomic_state *state,
> if (!dig_port->lspcon.active || intel_dp_has_hdmi_sink(&dig_port->dp))
> intel_dp_set_infoframes(encoder, true, crtc_state, conn_state);
>
> - intel_audio_codec_enable(encoder, crtc_state, conn_state);
> -
> trans_port_sync_stop_link_train(state, encoder, crtc_state);
> }
>
> @@ -3242,8 +3240,6 @@ static void intel_enable_ddi_hdmi(struct intel_atomic_state *state,
> intel_de_write(dev_priv, DDI_BUF_CTL(port), buf_ctl);
>
> intel_wait_ddi_buf_active(dev_priv, port);
> -
> - intel_audio_codec_enable(encoder, crtc_state, conn_state);
> }
>
> static void intel_enable_ddi(struct intel_atomic_state *state,
> @@ -3269,6 +3265,8 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
> intel_enable_ddi_dp(state, encoder, crtc_state, conn_state);
>
> intel_hdcp_enable(state, encoder, crtc_state, conn_state);
> +
> + intel_audio_codec_enable(encoder, crtc_state, conn_state);
> }
>
> static void intel_disable_ddi_dp(struct intel_atomic_state *state,
> @@ -3280,8 +3278,6 @@ static void intel_disable_ddi_dp(struct intel_atomic_state *state,
>
> intel_dp->link_trained = false;
>
> - intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state);
> -
> intel_psr_disable(intel_dp, old_crtc_state);
> intel_edp_backlight_off(old_conn_state);
> /* Disable the decompression in DP Sink */
> @@ -3300,8 +3296,6 @@ static void intel_disable_ddi_hdmi(struct intel_atomic_state *state,
> struct drm_i915_private *i915 = to_i915(encoder->base.dev);
> struct drm_connector *connector = old_conn_state->connector;
>
> - intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state);
> -
> if (!intel_hdmi_handle_sink_scrambling(encoder, connector,
> false, false))
> drm_dbg_kms(&i915->drm,
> @@ -3314,6 +3308,8 @@ static void intel_disable_ddi(struct intel_atomic_state *state,
> const struct intel_crtc_state *old_crtc_state,
> const struct drm_connector_state *old_conn_state)
> {
> + intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state);
> +
> intel_tc_port_link_cancel_reset_work(enc_to_dig_port(encoder));
>
> intel_hdcp_disable(to_intel_connector(old_conn_state->connector));
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index de608c8ee7b9..7747f23fa957 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -608,9 +608,9 @@ static void intel_mst_disable_dp(struct intel_atomic_state *state,
> drm_dbg_kms(&i915->drm, "active links %d\n",
> intel_dp->active_mst_links);
>
> - intel_hdcp_disable(intel_mst->connector);
> -
> intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state);
> +
> + intel_hdcp_disable(intel_mst->connector);
> }
>
> static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
> @@ -844,9 +844,9 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state,
>
> intel_crtc_vblank_on(pipe_config);
>
> - intel_audio_codec_enable(encoder, pipe_config, conn_state);
> -
> intel_hdcp_enable(state, encoder, pipe_config, conn_state);
> +
> + intel_audio_codec_enable(encoder, pipe_config, conn_state);
> }
>
> static bool intel_dp_mst_enc_get_hw_state(struct intel_encoder *encoder,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-11-13 15:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 21:19 [Intel-gfx] [PATCH 00/11] drm/i915: Audio fastset, and some fixes Ville Syrjala
2023-11-06 21:19 ` [Intel-gfx] [PATCH 01/11] drm/i915: Check pipe active state in {planes, vrr}_{enabling, disabling}() Ville Syrjala
2023-11-13 15:31 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 02/11] drm/i915: Call intel_pre_plane_updates() also for pipes getting enabled Ville Syrjala
2023-11-13 15:33 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 03/11] drm/i915: Polish some RMWs Ville Syrjala
2023-11-13 15:34 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 04/11] drm/i915: Push audio enable/disable further out Ville Syrjala
2023-11-13 15:35 ` Jani Nikula [this message]
2023-11-06 21:19 ` [Intel-gfx] [PATCH 05/11] drm/i915: Wrap g4x+ DP/HDMI audio enable/disable Ville Syrjala
2023-11-13 15:38 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 06/11] drm/i915: Split g4x+ DP audio presence detect from port enable Ville Syrjala
2023-11-13 15:39 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 07/11] drm/i915: Split g4x+ HDMI " Ville Syrjala
2023-11-13 15:41 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 08/11] drm/i915: Convert audio enable/disable into encoder vfuncs Ville Syrjala
2023-11-13 15:43 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 09/11] drm/i915: Hoist the encoder->audio_{enable, disable}() calls higher up Ville Syrjala
2023-11-13 15:47 ` Jani Nikula
2023-11-13 15:47 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 10/11] drm/i915: Push audio_{enable, disable}() to the pre/post pane update stage Ville Syrjala
2023-11-13 15:49 ` Jani Nikula
2023-11-14 8:57 ` Ville Syrjälä
2023-11-15 8:26 ` Ville Syrjälä
2023-11-15 8:31 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 11/11] drm/i915: Implement audio fastset Ville Syrjala
2023-11-13 15:51 ` Jani Nikula
2023-11-06 23:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Audio fastset, and some fixes Patchwork
2023-11-06 23:29 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-13 21:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Audio fastset, and some fixes (rev2) 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=875y25vf6z.fsf@intel.com \
--to=jani.nikula@linux.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 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.