|
@@ -375,7 +375,15 @@ static void intel_ddi_mode_set(struct intel_encoder *encoder)
|
|
DRM_DEBUG_KMS("Preparing DDI mode on port %c, pipe %c\n",
|
|
DRM_DEBUG_KMS("Preparing DDI mode on port %c, pipe %c\n",
|
|
port_name(port), pipe_name(pipe));
|
|
port_name(port), pipe_name(pipe));
|
|
|
|
|
|
- crtc->eld_vld = false;
|
|
|
|
|
|
+ if (crtc->config.has_audio) {
|
|
|
|
+ DRM_DEBUG_DRIVER("Audio on pipe %c on DDI\n",
|
|
|
|
+ pipe_name(crtc->pipe));
|
|
|
|
+
|
|
|
|
+ /* write eld */
|
|
|
|
+ DRM_DEBUG_DRIVER("DDI audio: write eld information\n");
|
|
|
|
+ intel_write_eld(&encoder->base, adjusted_mode);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (type == INTEL_OUTPUT_DISPLAYPORT || type == INTEL_OUTPUT_EDP) {
|
|
if (type == INTEL_OUTPUT_DISPLAYPORT || type == INTEL_OUTPUT_EDP) {
|
|
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
|
|
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
|
|
struct intel_digital_port *intel_dig_port =
|
|
struct intel_digital_port *intel_dig_port =
|
|
@@ -384,31 +392,9 @@ static void intel_ddi_mode_set(struct intel_encoder *encoder)
|
|
intel_dp->DP = intel_dig_port->saved_port_bits |
|
|
intel_dp->DP = intel_dig_port->saved_port_bits |
|
|
DDI_BUF_CTL_ENABLE | DDI_BUF_EMP_400MV_0DB_HSW;
|
|
DDI_BUF_CTL_ENABLE | DDI_BUF_EMP_400MV_0DB_HSW;
|
|
intel_dp->DP |= DDI_PORT_WIDTH(intel_dp->lane_count);
|
|
intel_dp->DP |= DDI_PORT_WIDTH(intel_dp->lane_count);
|
|
-
|
|
|
|
- if (intel_dp->has_audio) {
|
|
|
|
- DRM_DEBUG_DRIVER("DP audio on pipe %c on DDI\n",
|
|
|
|
- pipe_name(crtc->pipe));
|
|
|
|
-
|
|
|
|
- /* write eld */
|
|
|
|
- DRM_DEBUG_DRIVER("DP audio: write eld information\n");
|
|
|
|
- intel_write_eld(&encoder->base, adjusted_mode);
|
|
|
|
- }
|
|
|
|
} else if (type == INTEL_OUTPUT_HDMI) {
|
|
} else if (type == INTEL_OUTPUT_HDMI) {
|
|
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
|
|
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
|
|
|
|
|
|
- if (intel_hdmi->has_audio) {
|
|
|
|
- /* Proper support for digital audio needs a new logic
|
|
|
|
- * and a new set of registers, so we leave it for future
|
|
|
|
- * patch bombing.
|
|
|
|
- */
|
|
|
|
- DRM_DEBUG_DRIVER("HDMI audio on pipe %c on DDI\n",
|
|
|
|
- pipe_name(crtc->pipe));
|
|
|
|
-
|
|
|
|
- /* write eld */
|
|
|
|
- DRM_DEBUG_DRIVER("HDMI audio: write eld information\n");
|
|
|
|
- intel_write_eld(&encoder->base, adjusted_mode);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
intel_hdmi->set_infoframes(&encoder->base,
|
|
intel_hdmi->set_infoframes(&encoder->base,
|
|
crtc->config.has_hdmi_sink,
|
|
crtc->config.has_hdmi_sink,
|
|
adjusted_mode);
|
|
adjusted_mode);
|
|
@@ -1385,7 +1371,7 @@ static void intel_enable_ddi(struct intel_encoder *intel_encoder)
|
|
intel_edp_psr_enable(intel_dp);
|
|
intel_edp_psr_enable(intel_dp);
|
|
}
|
|
}
|
|
|
|
|
|
- if (intel_crtc->eld_vld && type != INTEL_OUTPUT_EDP) {
|
|
|
|
|
|
+ if (intel_crtc->config.has_audio) {
|
|
tmp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
|
|
tmp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
|
|
tmp |= ((AUDIO_OUTPUT_ENABLE_A | AUDIO_ELD_VALID_A) << (pipe * 4));
|
|
tmp |= ((AUDIO_OUTPUT_ENABLE_A | AUDIO_ELD_VALID_A) << (pipe * 4));
|
|
I915_WRITE(HSW_AUD_PIN_ELD_CP_VLD, tmp);
|
|
I915_WRITE(HSW_AUD_PIN_ELD_CP_VLD, tmp);
|
|
@@ -1591,6 +1577,10 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ temp = I915_READ(HSW_AUD_PIN_ELD_CP_VLD);
|
|
|
|
+ if (temp & (AUDIO_OUTPUT_ENABLE_A << (intel_crtc->pipe * 4)))
|
|
|
|
+ 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) {
|
|
/*
|
|
/*
|