From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v2] drm/i915/vlv: enable HDMI audio for Valleyview2 Date: Tue, 5 Nov 2013 07:56:27 +0100 Message-ID: <20131105065627.GQ4167@phenom.ffwll.local> References: <1382569691-3130-1-git-send-email-mengdong.lin@intel.com> <20131027135855.GH18189@phenom.ffwll.local> <20131101160232.GL4167@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by gabe.freedesktop.org (Postfix) with ESMTP id 854DEEEB5B for ; Mon, 4 Nov 2013 22:55:59 -0800 (PST) Received: by mail-ee0-f53.google.com with SMTP id e51so1592579eek.12 for ; Mon, 04 Nov 2013 22:55:58 -0800 (PST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: "Lin, Mengdong" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org 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@ffwll.ch] On Behalf Of Daniel Vetter > > Sent: Saturday, November 02, 2013 12:03 AM > > To: Lin, Mengdong > > Cc: Daniel Vetter; intel-gfx@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