Skip to content

Commit 1bd1817

Browse files
vgovind2jnikula
authored andcommitted
drm/i915/display: combine DP audio compute config steps
Combine all DP audio configs into a single function Signed-off-by: Vinod Govindapillai <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 2f092c0 commit 1bd1817

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,9 +2631,12 @@ intel_dp_audio_compute_config(struct intel_encoder *encoder,
26312631
struct drm_i915_private *i915 = to_i915(encoder->base.dev);
26322632
struct drm_connector *connector = conn_state->connector;
26332633

2634-
pipe_config->sdp_split_enable =
2634+
pipe_config->has_audio =
26352635
intel_dp_has_audio(encoder, conn_state) &&
2636-
intel_dp_is_uhbr(pipe_config);
2636+
intel_audio_compute_config(encoder, pipe_config, conn_state);
2637+
2638+
pipe_config->sdp_split_enable = pipe_config->has_audio &&
2639+
intel_dp_is_uhbr(pipe_config);
26372640

26382641
drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDP split enable: %s\n",
26392642
connector->base.id, connector->name,
@@ -2655,10 +2658,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
26552658
if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && encoder->port != PORT_A)
26562659
pipe_config->has_pch_encoder = true;
26572660

2658-
pipe_config->has_audio =
2659-
intel_dp_has_audio(encoder, conn_state) &&
2660-
intel_audio_compute_config(encoder, pipe_config, conn_state);
2661-
26622661
fixed_mode = intel_panel_fixed_mode(connector, adjusted_mode);
26632662
if (intel_dp_is_edp(intel_dp) && fixed_mode) {
26642663
ret = intel_panel_compute_config(connector, adjusted_mode);

0 commit comments

Comments
 (0)