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.pandi...@intel.com>
Cc: Libin Yang <libin.y...@intel.com>
Cc: Ville Syrjälä <ville.syrj...@linux.intel.com>
Cc: Jani Nikula <jani.nik...@intel.com>
Cc: Zanoni, Paulo R <paulo.r.zan...@intel.com>
---
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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to