summaryrefslogtreecommitdiff
path: root/tools/intel_audio_dump.c
AgeCommit message (Collapse)Author
2019-03-29Revert "lib/igt_device: Move intel_get_pci_device under igt_device"Ville Syrjälä
One significant usecase for intel_reg/etc. is to be able to examine the hardware state *before* loading the driver. If the tool forces the driver to load we've totally lost that capability. This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f. Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Michał Winiarski <michal.winiarski@intel.com>
2019-03-20lib/igt_device: Move intel_get_pci_device under igt_deviceMichał Winiarski
It allows us to make things a little bit more generic. Also, we now require fd rather than doing guesswork when it comes to pci address. v2: Use readlinkat rather than string concat, move stuff around, provide a version that does not assert. (Chris) v3: Print addr on failure, avoid assignment in conditionals. (Chris) Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-09-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-07-27lib: Update igt_chipset docsDaniel Vetter
gtkdoc can't handle aliasing, so let's rename the intel_device_info function. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-07-25intel_chipset: Fixup HAS_PCH_SPLIT() to exclude AtomsChris Wilson
The Atoms do not have the PCH split, exclude them from HAS_PCH_SPLIT(). At the time, I was planning to add the feature flag and make intel_pch_type() useful, but for now take the simple option of expanding th predicate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30lib: Start weaning off defunct intel_chipset.hChris Wilson
Several years ago we made the plan of only having one canonical source for i915_pciids.h, the kernel and everyone importing their definitions from that. For consistency, we style the intel_device_info after the kernel, most notably using a generation mask and a per-codename bitfield. This first step converts looking up the generation for a devid tree from a massive if(devid)-chain to a (cached) table lookup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02tools: Add missing Kabylake codename strings.Rodrigo Vivi
No functional change and no change in the current format. Just introducing the missing Kabylake name strings. v2: Duh! forgot the ")"... Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2015-10-14tools/intel_audio_dump: add support for BroxtonLu, Han
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-02-16tools/intel_audio_dump: add support for SkylakeLu, Han
This patch adds support for dumping audio registers of Skylake. Signed-off-by: Lu, Han <han.lu@intel.com>
2015-01-26tools/intel_audio_dump: add details dump for CherryviewLibin Yang
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-12tools/intel_audio_dump: add support for CherryviewYang, Libin
This patch adds support for dumping audio registers of Cherryview. Signed-off-by: Libin Yang <libin.yang@intel.com>
2014-03-22lib/intel_io: rename mmio setup functionsDaniel Vetter
Makes their intent a bit clearer. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
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-22lib: remove uncessary #includes from headersDaniel Vetter
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-14intel_audio_dump: fix CTS/M value indexMengdong Lin
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-06intel_audio_dump: add support for ValleyviewMengdong Lin
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-06intel_audio_dump: adjust code alignmentMengdong Lin
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
2014-03-06intel_audio_dump: share common audio dump code for Ironlake, Haswell & BroadwellMengdong Lin
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-06intel_audio_dump: define get_num_pipes() to get number of pipes for a device IDMengdong Lin
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-06intel_audio_dump: define IS_HASWELL_PLUS to cover Haswell and its successorsMengdong Lin
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-06intel_audio_dump: move definitions of transcoder/pipe/port/converter earlierMengdong Lin
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-06intel_audio_dump: support using base address plus an offset to dump registersMengdong Lin
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>
2013-11-06intel_audio_dump/bdw: dump audio M CTS readback registerMengdong Lin
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-06intel_audio_dump/bdw: dump audio DP and DIP FIFO debug statusMengdong Lin
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-06intel_audio_dump/bdw: dump audio chicken bit registerMengdong Lin
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-06intel_audio_dump/bdw: dump debug registers for audio immediate commandsMengdong Lin
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-06intel_audio_dump/bdw: add support for BroadwellMengdong Lin
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-09-16intel_audio_dump/hsw: rename some audio configuration registers for HaswellMengdong Lin
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-16intel_audio_dump/hsw: align code with tabMengdong Lin
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-16intel_audio_dump/hsw: remove misuse of PCH transcoder configuration registerMengdong Lin
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>
2012-08-15intel_audio_dump: add Haswell audio dump supportWang Xingchao
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-15intel_audio_dump: fix wrong port definitionWang Xingchao
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-01-21intel_audio_dump: show more AUD_CONFIG bitsWu Fengguang
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-21intel_audio_dump: fix missing Audio DIP tabsWu Fengguang
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-09tools/intel_audio_dump: fixup new warningsDaniel Vetter
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08List out array values instead of using gcc range extensionAlan Coopersmith
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-03intel_audio_dump: show Gamut Metadata DIPWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show interrupt enable bitWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show HDMI encodingWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show VIDEO_DIP_CTL_* for CPTWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show ironlake ELD_access_addressWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show ELD contents for G45Wu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show detected chipset nameWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: show DP control registers for IronlakeWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: explain Bits_per_SampleWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: fix DP port width for CPTWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: fix DP control registers for CPTWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: fix Ironlake detectionWu Fengguang
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-03intel_audio_dump: fix Digital_Port_D_Detected copy&paste errorWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-03intel_audio_dump: fix ironlake Stream_ID indentsWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>