Message ID | s5hwpsljd2j.wl-tiwai@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 11 Dec 2015 15:05:08 +0100, Takashi Iwai wrote: > > On Fri, 11 Dec 2015 07:07:53 +0100, > Libin Yang wrote: > > > > Add Takashi and ALSA mail list. > > > > On 12/10/2015 05:02 PM, Daniel Vetter wrote: > > > On Tue, Dec 08, 2015 at 04:01:20PM +0800, Libin Yang wrote: > > >> Hi all, > > >> > > >> Any comments on the patches? > > > > > > Sorry, simply fell through the cracks since Ander is on vacation. Takashi > > > is working on some cleanup patches to have a port->encoder mapping for the > > > audio side of i915. His patch cleans up all the existing audio code in > > > i915, but please work together with him to align mst code with the new > > > style. > > > > > > Both patches queued for next. > > > > Yes, I have seen Takashi's patches. I will check the patches. > > The patch like below should work; it sets/clears the reverse mapping > dynamically for the MST encoder. This might be too shortsighted and broken -- if multiple devices are hook on the same port... Now I wonder which graphics part actually corresponds to the HD-audio widget. So far, we supposed that each pin widget 0x05-0x07 corresponds to the digital port B-D in the fixed manner. If so, how is the case where two devices on the same port? In the codec level, we get an unsolicited event on the same pin but check with the different device index. What would be a unique index instead that can be passed via the component ops? Then, another question is which audio converter widget is used and how is set up, if multiple devices were on the same pin. Libin, do you have any git branch where MST really works? I should test it at first to confirm that it actually works on my test system. thanks, Takashi
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 8b608c2cd070..87dad62fd10b 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -108,6 +108,7 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder) struct drm_i915_private *dev_priv = dev->dev_private; struct drm_crtc *crtc = encoder->base.crtc; struct intel_crtc *intel_crtc = to_intel_crtc(crtc); + enum port port = intel_dig_port->port; int ret; @@ -122,6 +123,9 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder) if (intel_crtc->config->has_audio) { intel_audio_codec_disable(encoder); intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO); + mutex_lock(&dev_priv->av_mutex); + dev_priv->dig_port_map[port] = NULL; + mutex_unlock(&dev_priv->av_mutex); } } @@ -236,6 +240,9 @@ static void intel_mst_enable_dp(struct intel_encoder *encoder) if (crtc->config->has_audio) { DRM_DEBUG_DRIVER("Enabling DP audio on pipe %c\n", pipe_name(crtc->pipe)); + mutex_lock(&dev_priv->av_mutex); + dev_priv->dig_port_map[port] = encoder; + mutex_unlock(&dev_priv->av_mutex); intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); intel_audio_codec_enable(encoder); }