Commit be754b10 authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan Committed by Jani Nikula

Revert "drm/i915: start adding dp mst audio"

This reverts 'commit 3708d5e0 ("drm/i915: start adding dp mst audio")'
because it breaks MST multi-monitor setups on some platforms.

Fixes: 3708d5e0 ("drm/i915: start adding dp mst audio")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97907Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reported-by: default avatarKim Lidström <kim@dxtr.im>
Cc: Libin Yang <libin.yang@linux.intel.com>
Cc: Lyude <cpaul@redhat.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1475132104-2754-1-git-send-email-dhinakaran.pandiyan@intel.com
parent 7d7f8633
...@@ -2889,20 +2889,6 @@ static void intel_dp_info(struct seq_file *m, ...@@ -2889,20 +2889,6 @@ static void intel_dp_info(struct seq_file *m,
&intel_dp->aux); &intel_dp->aux);
} }
static void intel_dp_mst_info(struct seq_file *m,
struct intel_connector *intel_connector)
{
struct intel_encoder *intel_encoder = intel_connector->encoder;
struct intel_dp_mst_encoder *intel_mst =
enc_to_mst(&intel_encoder->base);
struct intel_digital_port *intel_dig_port = intel_mst->primary;
struct intel_dp *intel_dp = &intel_dig_port->dp;
bool has_audio = drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
intel_connector->port);
seq_printf(m, "\taudio support: %s\n", yesno(has_audio));
}
static void intel_hdmi_info(struct seq_file *m, static void intel_hdmi_info(struct seq_file *m,
struct intel_connector *intel_connector) struct intel_connector *intel_connector)
{ {
...@@ -2945,9 +2931,6 @@ static void intel_connector_info(struct seq_file *m, ...@@ -2945,9 +2931,6 @@ static void intel_connector_info(struct seq_file *m,
switch (connector->connector_type) { switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DisplayPort: case DRM_MODE_CONNECTOR_DisplayPort:
case DRM_MODE_CONNECTOR_eDP: case DRM_MODE_CONNECTOR_eDP:
if (intel_encoder->type == INTEL_OUTPUT_DP_MST)
intel_dp_mst_info(m, intel_connector);
else
intel_dp_info(m, intel_connector); intel_dp_info(m, intel_connector);
break; break;
case DRM_MODE_CONNECTOR_LVDS: case DRM_MODE_CONNECTOR_LVDS:
......
...@@ -2227,19 +2227,6 @@ void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp) ...@@ -2227,19 +2227,6 @@ void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
udelay(600); udelay(600);
} }
bool intel_ddi_is_audio_enabled(struct drm_i915_private *dev_priv,
struct intel_crtc *intel_crtc)
{
u32 temp;
if (intel_display_power_is_enabled(dev_priv, POWER_DOMAIN_AUDIO)) {
temp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
if (temp & AUDIO_OUTPUT_ENABLE(intel_crtc->pipe))
return true;
}
return false;
}
void intel_ddi_get_config(struct intel_encoder *encoder, void intel_ddi_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config) struct intel_crtc_state *pipe_config)
{ {
...@@ -2305,8 +2292,11 @@ void intel_ddi_get_config(struct intel_encoder *encoder, ...@@ -2305,8 +2292,11 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
break; break;
} }
pipe_config->has_audio = if (intel_display_power_is_enabled(dev_priv, POWER_DOMAIN_AUDIO)) {
intel_ddi_is_audio_enabled(dev_priv, intel_crtc); temp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
if (temp & AUDIO_OUTPUT_ENABLE(intel_crtc->pipe))
pipe_config->has_audio = true;
}
if (encoder->type == INTEL_OUTPUT_EDP && dev_priv->vbt.edp.bpp && if (encoder->type == INTEL_OUTPUT_EDP && dev_priv->vbt.edp.bpp &&
pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) { pipe_config->pipe_bpp > dev_priv->vbt.edp.bpp) {
......
...@@ -37,8 +37,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, ...@@ -37,8 +37,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base);
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 intel_connector *connector =
to_intel_connector(conn_state->connector);
struct drm_atomic_state *state; struct drm_atomic_state *state;
int bpp; int bpp;
int lane_count, slots; int lane_count, slots;
...@@ -61,8 +59,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, ...@@ -61,8 +59,6 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
state = pipe_config->base.state; state = pipe_config->base.state;
if (drm_dp_mst_port_has_audio(&intel_dp->mst_mgr, connector->port))
pipe_config->has_audio = true;
mst_pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock, bpp); mst_pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock, bpp);
pipe_config->pbn = mst_pbn; pipe_config->pbn = mst_pbn;
...@@ -88,7 +84,6 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder, ...@@ -88,7 +84,6 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder,
struct intel_dp *intel_dp = &intel_dig_port->dp; struct intel_dp *intel_dp = &intel_dig_port->dp;
struct intel_connector *connector = struct intel_connector *connector =
to_intel_connector(old_conn_state->connector); to_intel_connector(old_conn_state->connector);
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
int ret; int ret;
DRM_DEBUG_KMS("%d\n", intel_dp->active_mst_links); DRM_DEBUG_KMS("%d\n", intel_dp->active_mst_links);
...@@ -99,10 +94,6 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder, ...@@ -99,10 +94,6 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder,
if (ret) { if (ret) {
DRM_ERROR("failed to update payload %d\n", ret); DRM_ERROR("failed to update payload %d\n", ret);
} }
if (old_crtc_state->has_audio) {
intel_audio_codec_disable(encoder);
intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO);
}
} }
static void intel_mst_post_disable_dp(struct intel_encoder *encoder, static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
...@@ -215,12 +206,6 @@ static void intel_mst_enable_dp(struct intel_encoder *encoder, ...@@ -215,12 +206,6 @@ static void intel_mst_enable_dp(struct intel_encoder *encoder,
ret = drm_dp_check_act_status(&intel_dp->mst_mgr); ret = drm_dp_check_act_status(&intel_dp->mst_mgr);
ret = drm_dp_update_payload_part2(&intel_dp->mst_mgr); ret = drm_dp_update_payload_part2(&intel_dp->mst_mgr);
if (pipe_config->has_audio) {
DRM_DEBUG_DRIVER("Enabling DP audio on pipe %c\n",
pipe_name(intel_mst->pipe));
intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
intel_audio_codec_enable(encoder);
}
} }
static bool intel_dp_mst_enc_get_hw_state(struct intel_encoder *encoder, static bool intel_dp_mst_enc_get_hw_state(struct intel_encoder *encoder,
...@@ -243,9 +228,6 @@ static void intel_dp_mst_enc_get_config(struct intel_encoder *encoder, ...@@ -243,9 +228,6 @@ static void intel_dp_mst_enc_get_config(struct intel_encoder *encoder,
enum transcoder cpu_transcoder = pipe_config->cpu_transcoder; enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
u32 temp, flags = 0; u32 temp, flags = 0;
pipe_config->has_audio =
intel_ddi_is_audio_enabled(dev_priv, crtc);
temp = I915_READ(TRANS_DDI_FUNC_CTL(cpu_transcoder)); temp = I915_READ(TRANS_DDI_FUNC_CTL(cpu_transcoder));
if (temp & TRANS_DDI_PHSYNC) if (temp & TRANS_DDI_PHSYNC)
flags |= DRM_MODE_FLAG_PHSYNC; flags |= DRM_MODE_FLAG_PHSYNC;
......
...@@ -1156,8 +1156,6 @@ bool intel_ddi_pll_select(struct intel_crtc *crtc, ...@@ -1156,8 +1156,6 @@ bool intel_ddi_pll_select(struct intel_crtc *crtc,
void intel_ddi_set_pipe_settings(struct drm_crtc *crtc); void intel_ddi_set_pipe_settings(struct drm_crtc *crtc);
void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp); void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp);
bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector); bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
bool intel_ddi_is_audio_enabled(struct drm_i915_private *dev_priv,
struct intel_crtc *intel_crtc);
void intel_ddi_get_config(struct intel_encoder *encoder, void intel_ddi_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config); struct intel_crtc_state *pipe_config);
struct intel_encoder * struct intel_encoder *
......
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