[Intel-gfx] [PATCH v2] drm/i915/vlv: enable HDMI audio for Valleyview2
Daniel Vetter
daniel at ffwll.ch
Tue Nov 5 07:56:27 CET 2013
On Tue, Nov 05, 2013 at 05:34:18AM +0000, Lin, Mengdong wrote:
> Hi Daniel,
>
> Thanks for your clarification! Could you share more info ...
>
> > -----Original Message-----
> > From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel Vetter
> > Sent: Saturday, November 02, 2013 12:03 AM
> > To: Lin, Mengdong
> > Cc: Daniel Vetter; intel-gfx at lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/vlv: enable HDMI audio for
> > Valleyview2
> >
> > On Fri, Nov 01, 2013 at 03:13:17PM +0000, Lin, Mengdong wrote:
> > > > Maybe we could use the port CRC stuff to make sure that audio is
> > > > actually working ...
> > >
> > > Would you please clarify what's port CRC stuff?
> >
> > The hw has a bunch of CRC (checksum) functions. We've just enabled it at the
> > pipe level, and it's extremely useful to test whether e.g. the cursor is displaying
> > properly or whether it's not shown at all. We've had a few bugs where the
> > cursor was disabled but shouldnt have been.
> >
> > For an example of such a testcase see i-g-t/tests/kms_cursor_crc.c. This is all
> > really new, so still in flux.
> >
> > Now the hardware also has checksum support for each port, and afaik that
> > includes the audio stream. Iirc never platforms even have special CRCs for the
> > individual audio streams. My idea for a testcase would be to expose these port
> > CRCs. Then check that the CRC is stable for each display frame while no audio is
> > playing, and that it changes (and that the right port starts to change) once we
> > play an audio stream.
>
> What's 'IIRC never platforms'?
Oops, I've meant to write "newer platforms".
> Where can I find more information about port or audio CRC?
>
> In Baytrail b-spec, I saw CRCCtrlRedA-Pipe A CRC Color Channel Control Register can select source:
> CRC Source Select: These bits select the source of the data to put into the CRC logic.
> 0000: Pipe A ....
> 0110: DisplayPort B
> 0111: DisplayPort C
> 1000: Audio DP (Audio for DisplayPort (pcdclk). Only select when Audio is on DisplayPort on Pipe A)
> 1001: Audio HDMI (Audio for HDMI (dotclock) Only select when Audio is on HDMI on Pipe A)
>
> But I still cannot understand how to get CRC for both video and audio.
> And does the CRC does not change for each display frame, even when a video is playing and pictures content change from frame to frame?
> I hope to know more about how HW generates the CRC, so your info or any documentation will be appreciated.
For baytrail we have many of these CRC sources enabled already, see
vlv_pipe_crc_ctl_reg in i915_debugfs.c. So for a quick test I'd add the
new targets and just see what happens. Iirc on Byt display pipe = audio
port.
Big core platforms (broadwell would be the next) have special CRC
registers for the ports/audio stuff. Currently we only have CRC support up
to Haswell, and only for the display pipe (not yet for ports or audio
channels). You should find information about them in the internal Bspec.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list