Commit 765bdb0b authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326142556.21176-2-ville.syrjala@linux.intel.com
parent 37aa52bf
...@@ -38,6 +38,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder, ...@@ -38,6 +38,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
struct intel_digital_port *intel_dig_port = intel_mst->primary; struct intel_digital_port *intel_dig_port = intel_mst->primary;
struct intel_dp *intel_dp = &intel_dig_port->dp; struct intel_dp *intel_dp = &intel_dig_port->dp;
struct drm_connector *connector = conn_state->connector; struct drm_connector *connector = conn_state->connector;
struct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(conn_state);
void *port = to_intel_connector(connector)->port; void *port = to_intel_connector(connector)->port;
struct drm_atomic_state *state = pipe_config->base.state; struct drm_atomic_state *state = pipe_config->base.state;
struct drm_crtc *crtc = pipe_config->base.crtc; struct drm_crtc *crtc = pipe_config->base.crtc;
...@@ -62,6 +64,14 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder, ...@@ -62,6 +64,14 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
DRM_DEBUG_KMS("Setting pipe bpp to %d\n", DRM_DEBUG_KMS("Setting pipe bpp to %d\n",
bpp); bpp);
} }
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
pipe_config->has_audio =
drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port);
else
pipe_config->has_audio =
intel_conn_state->force_audio == HDMI_AUDIO_ON;
/* /*
* for MST we always configure max link bw - the spec doesn't * for MST we always configure max link bw - the spec doesn't
* seem to suggest we should do otherwise. * seem to suggest we should do otherwise.
...@@ -74,9 +84,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder, ...@@ -74,9 +84,6 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
pipe_config->port_clock = intel_dp_max_link_rate(intel_dp); pipe_config->port_clock = intel_dp_max_link_rate(intel_dp);
if (drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, port))
pipe_config->has_audio = true;
pipe_config->limited_color_range = pipe_config->limited_color_range =
intel_dp_limited_color_range(pipe_config, conn_state); intel_dp_limited_color_range(pipe_config, conn_state);
...@@ -496,6 +503,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo ...@@ -496,6 +503,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
if (ret) if (ret)
goto err; goto err;
intel_attach_force_audio_property(connector);
intel_attach_broadcast_rgb_property(connector); intel_attach_broadcast_rgb_property(connector);
return connector; return connector;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment