Skip to content

Commit 765bdb0

Browse files
committed
drm/i915: Expose the force_audio property with DP MST
We already expose the force_audio property with SST. Do the same with MST. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 37aa52b commit 765bdb0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

drivers/gpu/drm/i915/intel_dp_mst.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
3838
struct intel_digital_port *intel_dig_port = intel_mst->primary;
3939
struct intel_dp *intel_dp = &intel_dig_port->dp;
4040
struct drm_connector *connector = conn_state->connector;
41+
struct intel_digital_connector_state *intel_conn_state =
42+
to_intel_digital_connector_state(conn_state);
4143
void *port = to_intel_connector(connector)->port;
4244
struct drm_atomic_state *state = pipe_config->base.state;
4345
struct drm_crtc *crtc = pipe_config->base.crtc;
@@ -62,6 +64,14 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
6264
DRM_DEBUG_KMS("Setting pipe bpp to %d\n",
6365
bpp);
6466
}
67+
68+
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
69+
pipe_config->has_audio =
70+
drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port);
71+
else
72+
pipe_config->has_audio =
73+
intel_conn_state->force_audio == HDMI_AUDIO_ON;
74+
6575
/*
6676
* for MST we always configure max link bw - the spec doesn't
6777
* seem to suggest we should do otherwise.
@@ -74,9 +84,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
7484

7585
pipe_config->port_clock = intel_dp_max_link_rate(intel_dp);
7686

77-
if (drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port))
78-
pipe_config->has_audio = true;
79-
8087
pipe_config->limited_color_range =
8188
intel_dp_limited_color_range(pipe_config, conn_state);
8289

@@ -496,6 +503,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
496503
if (ret)
497504
goto err;
498505

506+
intel_attach_force_audio_property(connector);
499507
intel_attach_broadcast_rgb_property(connector);
500508

501509
return connector;

0 commit comments

Comments
 (0)