@@ -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);
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@intel.com> Cc: Libin Yang <libin.yang@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Zanoni, Paulo R <paulo.r.zanoni@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(+)