Re: [PATCH 2/4] i915: add support for GPU side of MST audio

Lin, Mengdong
2015-06-19T06:27:58Z

> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of
> Jani Nikula

> On Wed, 17 Jun 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > On Wed, Jun 17, 2015 at 02:01:57PM +1000, Dave Airlie wrote:
> >> From: Dave Airlie <airlied@redhat.com>
> >>
> >> This just adds enables for the codecs and debugfs support for mst
> >> connectors to print the audio info.
> >>
> >> This relies on patches to the audio code to do anything more useful.
> >>
> >> Signed-off-by: Dave Airlie <airlied@redhat.com>
> >> ---
> >> @@ -231,6 +231,7 @@ static void hsw_audio_codec_enable(struct
> drm_connector *connector,
> >> /* Reset ELD write address */
> >> tmp = I915_READ(HSW_AUD_DIP_ELD_CTRL(pipe));
> >> tmp &= ~IBX_ELD_ADDRESS_MASK;
> >> + tmp |= ((pipe + 1) << 29);

I think we should not add this line.
DIP Port Select [Bit 30:29 ]of register AUD_DIP_ELD_CTRL_ST is ReadOnly.

For DP MST, I think the device select happens in both i915 driver and
HD-Audio driver:
- For i915 driver, it should select which transcoder/pipe is connected to a
device on a port. MST allows 3 devices on a port.
Could someone guide me to the code?
The Bit 30:29 just reflect the selection, although I think this is not enough
because it only tell the port number, but now we hope know the device
entry on a port.

- For audio driver, it should select which convertor is connected to a device
of a codec pin (pin is a mapping for a DDI port). We need to add the support
in HD-A driver. The default device entry is 0 for a pin. Current HD-A driver
does not handle other 2 device entries on a pin.

Thanks
Mengdong

> >> I915_WRITE(HSW_AUD_DIP_ELD_CTRL(pipe), tmp);
> >
> > This is not MST specific. Is this a bug fix we want ASAP?
>
>
> """
> This read-only bit reflects which port is used to transmit the DIP data. This can
> only change when DIP is disabled. If one or more audio-related DIP packets is
> enabled and audio is enabled on a digital port, these bits will reflect the digital
> port to which audio is directed.
>
> For DP MST, this is the device select/pipe select.
> """
>
> We shouldn't mess with the field if it's regular DP. Also "pipe + 1" is too magic;
> unfortunately I don't know what it should be. :(
>
> BR,
> Jani.
>
>
>
>
>
>
>
> > -Chris
> >
> > --
> > Chris Wilson, Intel Open Source Technology Centre
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx