51 Commits

Author SHA1 Message Date
Lu, Han
3e9726b337 tools/intel_audio_dump: add support for Broxton
This patch adds support for dumping audio registers of Broxton.

Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-10-14 15:45:23 +01:00
Lu, Han
e8e28931b1 tools/intel_audio_dump: add support for Skylake
This patch adds support for dumping audio registers of Skylake.

Signed-off-by: Lu, Han <han.lu@intel.com>
2015-02-16 12:35:40 +08:00
Libin Yang
ebd8b32bc6 tools/intel_audio_dump: add details dump for Cherryview
This patch adds the details dump for audio registers of Cherryview.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2015-01-26 16:06:46 +08:00
Yang, Libin
9917744176 tools/intel_audio_dump: add support for Cherryview
This patch adds support for dumping audio registers of Cherryview.

Signed-off-by: Libin Yang <libin.yang@intel.com>
2015-01-12 14:44:12 +08:00
Daniel Vetter
2d4656fb69 lib/intel_io: rename mmio setup functions
Makes their intent a bit clearer.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 22:23:04 +01:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
6cfcd71589 lib: remove uncessary #includes from headers
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.

One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 20:08:13 +01:00
Mengdong Lin
8fe0c50871 intel_audio_dump: fix CTS/M value index
This patch fixes the reversed CTS/M value index when dumping the
'audio M/CTS programing enable' register.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-14 23:07:07 -07:00
Mengdong Lin
449509dddb intel_audio_dump: add support for Valleyview
This patch adds support for dumping audio registers of Valleyview,
by reusing Ironlake code with a different base address and pipe number.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
fa8c75028e intel_audio_dump: adjust code alignment
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
86d15e080d intel_audio_dump: share common audio dump code for Ironlake, Haswell & Broadwell
Most audio config registers of Ironlake, Haswell and Broadwell are almost same
although the register names or some bit fields have little difference.
And HSW and BDW already share their code.

This patch further shares code for ILK and HSW/BDW:
- ILK and HSW/BDW define their own base address to dump audio & display registers.
- Small functions to dump a specific register are defined and shared.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
bae8a005d2 intel_audio_dump: define get_num_pipes() to get number of pipes for a device ID
It's for future code sharing because some registers define their bit fields
according to the number of pipes.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
1803f1ebfa intel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successors
A macro IS_HASWELL_PLUS(devid) is defined to cover Haswell and its successors,
for code sharing. Now it covers HSW and BDW.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
ed386663fe intel_audio_dump: move definitions of transcoder/pipe/port/converter earlier
Move these enum definitions earlier for future code sharing.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
92d3197025 intel_audio_dump: support using base address plus an offset to dump registers
Layout of display and audio registers can be same for different Intel GPUs.
For code sharing, this patches defines functions to
- set the base address of display and audio registers
- dump registers using the base address and an offset

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06 16:42:52 +08:00
Mengdong Lin
e35126d30c intel_audio_dump/bdw: dump audio M CTS readback register
This debug register provides test feedback of the audio M values (DP)
or CTS values (HDMI)

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
97e5cf6006 intel_audio_dump/bdw: dump audio DP and DIP FIFO debug status
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
f075c3c068 intel_audio_dump/bdw: dump audio chicken bit register
This patch dumps this debug register and parse the data for Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-11-06 09:39:41 -08:00
Mengdong Lin
8535720b4c intel_audio_dump/bdw: dump debug registers for audio immediate commands
This patch dumps debug registers to check audio immediate command, response
and status.

The audio driver will fall back into immediate command mode if normal
communication between controller and codec is dead.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Xingchao Wang <xingchao.wang@intel.com>
[Ben: Small printf changes to remove compiler warning]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Mengdong Lin
69cc00b072 intel_audio_dump/bdw: add support for Broadwell
This patch renames Haswell audio dump function and reuses it for Broadwell.

Since Haswell, audio registers are moved from the south display engine to the
north display engine. And the audio register layout is same for Haswell and its
successors like Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:39:41 -08:00
Mengdong Lin
deba868066 intel_audio_dump/hsw: rename some audio configuration registers for Haswell
For Haswell, some audio configuration registers have changed their name and
some bit definitions.

This patch applies the changes, and uses subfunctions to parse registers for
code reuse.

Here is the name change list:
Audio configuration: AUD_CONFIG_x to AUD_TCx_CONFIG
Audio Misc Control: AUD_MISC_CTRL_x to AUD_Cn_MISC_CTRL
Audio M & CTS programming enable: AUD_CTS_ENABLE_x to AUD_TCx_M_CTS_ENABLE
Audio EDID data block: AUD_HDMIW_HDMIEDID_x to AUD_TCx_EDID_DATA
Audio Widget Data Island Packet: AUD_HDMIW_INFOFR_x to AUD_TCx_AUD_INFOFR
Audio Pipe and Converter Configs: AUD_PORT_EN_HD_CFG to AUD_PIPE_CONV_CFG
Audio Digital Converter: AUD_OUT_DIG_CNVT_x to AUD_Cn_DIG_CNVT
Audio Stream Descriptor Format: AUD_OUT_STR_DESC_x to AUD_Cn_STR_DESC
Audio Connect List Entry & Length:  AUD_PINW_CONNLNG_LIST_x to
                                        AUD_TCx_PIN_PIPE_CONN_ENTRY_LNGTH
Audio Connection Select Control: AUD_PINW_CONNLNG_SEL to AUD_PIPE_CONN_SEL_CTRL
Audio DIP & ELD Control State: AUD_DIP_ELD_CTRL_ST_x to AUD_TCx_DIP_ELD_CTRL_ST
Audio HDMI FIFO status: AUD_HDMIW_STATUS to AUD_HDMI_FIFO_STATUS

NOTE:
For Tx, x = A/B/C, meaning Transcoder A/B/C.
For Cn, n = 1/2/3, meaning audio converter 1/2/3.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-09-16 14:20:28 -07:00
Mengdong Lin
3c7dc5cf32 intel_audio_dump/hsw: align code with tab
This patch makes the file to follow kernel coding style:
- replace leading spaces with tabs for alignment
- fix some minor format issues

But the max length of a line is set to 120 characters for readability
on high resolution displays.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-09-16 14:20:28 -07:00
Mengdong Lin
cac586586d intel_audio_dump/hsw: remove misuse of PCH transcoder configuration register
The PCH transcoder config register (PCH_TRANS_CONF, 0xf0008) is not the
correct config register for transcoder A, B or C. This register is in
PCH and for CRT display, nothing to do with display audio.

So This patch removes misuse of it as config register for transcoder A/B/C.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2013-09-16 14:20:28 -07:00
Wang Xingchao
c407722048 intel_audio_dump: add Haswell audio dump support
Add Haswell audio registers definition and dump support.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-15 11:08:43 +02:00
Wang Xingchao
f9a2481e71 intel_audio_dump: fix wrong port definition
there're three Ports B/C/D used for selection by each transcoder A/B/C.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-15 11:08:39 +02:00
Wu Fengguang
e64abe581a intel_audio_dump: show more AUD_CONFIG bits
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-21 23:35:09 +01:00
Wu Fengguang
3beea0bd0c intel_audio_dump: fix missing Audio DIP tabs
This makes the SNB/IVY Audio DIP values aligned with others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-21 23:34:47 +01:00
Daniel Vetter
03ab1328a7 tools/intel_audio_dump: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:28 +01:00
Alan Coopersmith
c461006bac List out array values instead of using gcc range extension
Required to compile with Solaris Studio cc compiler.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Wu Fengguang
f3f84bb350 intel_audio_dump: show Gamut Metadata DIP
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
821e07d00d intel_audio_dump: show interrupt enable bit
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
ee94958d13 intel_audio_dump: show HDMI encoding
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
e321f1315b intel_audio_dump: show VIDEO_DIP_CTL_* for CPT
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
c0635c3f5c intel_audio_dump: show ironlake ELD_access_address
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:23 +01:00
Wu Fengguang
f32aecb296 intel_audio_dump: show ELD contents for G45
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
6fcb5cdcbc intel_audio_dump: show detected chipset name
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
b5ca6b4410 intel_audio_dump: show DP control registers for Ironlake
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
12861a9568 intel_audio_dump: explain Bits_per_Sample
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
cf4c12f103 intel_audio_dump: fix DP port width for CPT
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
97d203140c intel_audio_dump: fix DP control registers for CPT
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
63e3c37838 intel_audio_dump: fix Ironlake detection
The original test mistakenly calls dump_cpt() for Ironlake,
due to HAS_PCH_SPLIT := IS_GEN5 || IS_GEN6 || IS_GEN7.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
305443cf0a intel_audio_dump: fix Digital_Port_D_Detected copy&paste error
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
d6bdaf01f9 intel_audio_dump: fix ironlake Stream_ID indents
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
5032f68a77 intel_audio_dump: report effective channel count
The raw channel count is not user friendly and may be misleading.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
1c6a7cade7 intel_audio_dump: cleanup hex output
- no need to show the 1-bit AUD_OUT_DIG_CNVT_* as hex value
- show the Connection_select_Control_* bits as hex values

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
d6e38ffb6f intel_audio_dump: cleanup ACP DIP name for ironlake and CPT
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Wu Fengguang
ea3815cd03 intel_audio_dump: cleanup hyphen character
Convert "­" (Hex 00ad) to "-" (Hex 2d), the former leads to ugly outputs
in some situations.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03 13:58:22 +01:00
Chris Wilson
3c5c8ba71c Search for the first Intel dri device.
This is vital in a multi-GPU system so that we only test the Intel card
and not the discrete GPUs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-01 13:37:04 +00:00
Wu Fengguang
020abdb7cc intel_audio_dump: add support for IbexPeak and CougarPoint
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2010-04-29 15:29:09 -07:00
Chris Wilson
95374225e8 Enable compilation on non-Intel, non-DRM systems.
A few of the tools can be performed post-mortem from a different system,
so it is useful to be able to compile those tools on those foreign
systems. Obviously, any program to interact with the PCI device or talk
to GEM will fail on a non-Intel system.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-08 12:17:31 +01:00