[PATCH] drm/dp/i915: Enable audio codec after the HDA audio driver is initialized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes the underruns that are seen in DP MST multi-monitor
setups when audio is enabled with
commit 3708d5e082c3 ("drm/i915: start adding dp mst audio"). The underruns
triggered continuous cycles of display on/off cycles.

Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
Cc: Libin Yang <libin.yang@xxxxxxxxx>
Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
Cc: Zanoni, Paulo R <paulo.r.zanoni@xxxxxxxxx>
---
Not exactly sure why this works for me, but I am sending this patch to get
some feedback in case the idea is completely wrong. In the meantime, I
will try to get some testing done on platforms other than SKL.

 drivers/gpu/drm/i915/intel_audio.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 9583f43..3f4e741 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -497,6 +497,9 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
 	if (!connector)
 		return;
 
+	if (!acomp)
+		return;
+
 	DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n",
 			 connector->base.id,
 			 connector->name,
@@ -546,6 +549,9 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder)
 	struct intel_crtc *crtc = to_intel_crtc(encoder->crtc);
 	enum pipe pipe = crtc->pipe;
 
+	if (!acomp)
+		return;
+
 	if (dev_priv->display.audio_codec_disable)
 		dev_priv->display.audio_codec_disable(intel_encoder);
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux