Skip to content

Commit 897f453

Browse files
vsyrjalajnikula
authored andcommitted
drm/i915: Fix audio ELD handling for DP MST
I forgot to call intel_audio_compute_config() on DP MST, which means ELD doesn't get populated and passed to the audio driver. References: https://gitlab.freedesktop.org/drm/intel/-/issues/8097 Fixes: 5d98663 ("drm/i915/audio: Precompute the ELD") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Uma Shankar <[email protected]> (cherry picked from commit 518b761) Signed-off-by: Jani Nikula <[email protected]>
1 parent ee892ea commit 897f453

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,26 @@ static int intel_dp_mst_update_slots(struct intel_encoder *encoder,
265265
return 0;
266266
}
267267

268+
static bool intel_dp_mst_has_audio(const struct drm_connector_state *conn_state)
269+
{
270+
const struct intel_digital_connector_state *intel_conn_state =
271+
to_intel_digital_connector_state(conn_state);
272+
struct intel_connector *connector =
273+
to_intel_connector(conn_state->connector);
274+
275+
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
276+
return connector->port->has_audio;
277+
else
278+
return intel_conn_state->force_audio == HDMI_AUDIO_ON;
279+
}
280+
268281
static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
269282
struct intel_crtc_state *pipe_config,
270283
struct drm_connector_state *conn_state)
271284
{
272285
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
273286
struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
274287
struct intel_dp *intel_dp = &intel_mst->primary->dp;
275-
struct intel_connector *connector =
276-
to_intel_connector(conn_state->connector);
277-
struct intel_digital_connector_state *intel_conn_state =
278-
to_intel_digital_connector_state(conn_state);
279288
const struct drm_display_mode *adjusted_mode =
280289
&pipe_config->hw.adjusted_mode;
281290
struct link_config_limits limits;
@@ -287,11 +296,9 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
287296
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
288297
pipe_config->has_pch_encoder = false;
289298

290-
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
291-
pipe_config->has_audio = connector->port->has_audio;
292-
else
293-
pipe_config->has_audio =
294-
intel_conn_state->force_audio == HDMI_AUDIO_ON;
299+
pipe_config->has_audio =
300+
intel_dp_mst_has_audio(conn_state) &&
301+
intel_audio_compute_config(encoder, pipe_config, conn_state);
295302

296303
/*
297304
* for MST we always configure max link bw - the spec doesn't

0 commit comments

Comments
 (0)