drm/i915: Enable DP audio for Haswell
authorTakashi Iwai <tiwai@suse.de>
Mon, 19 Nov 2012 17:06:51 +0000 (18:06 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Nov 2012 16:45:05 +0000 (17:45 +0100)
This patch adds the missing code to send ELD for Haswell DisplayPort,
based on Xingchao's original patch.

A test was performed with HSW-D machine and NEC EA232Wmi DP monitor.

Cc: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ddi.c

index 58f50ebdbef6f28f8bb59b931dada41deb5fe396..d706d538e8b74c404253bb322c5fc51adc5e1898 100644 (file)
@@ -669,6 +669,15 @@ static void intel_ddi_mode_set(struct drm_encoder *encoder,
                        break;
                }
 
+               if (intel_dp->has_audio) {
+                       DRM_DEBUG_DRIVER("DP audio on pipe %c on DDI\n",
+                                        pipe_name(intel_crtc->pipe));
+
+                       /* write eld */
+                       DRM_DEBUG_DRIVER("DP audio: write eld information\n");
+                       intel_write_eld(encoder, adjusted_mode);
+               }
+
                intel_dp_init_link_config(intel_dp);
 
        } else if (type == INTEL_OUTPUT_HDMI) {