463 Commits

Author SHA1 Message Date
Imre Deak
a6eaa29271 igt/quickdump: vlv: dump FLISDSI regs too
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-05-19 20:13:15 +03:00
Jani Nikula
7935bbd9ba intel_bios_reader: make edp block decode match kernel
All the somewhat recent VBT specs and the kernel have different format
for the eDP block than what the tool decodes. What the tool does *may*
be correct for really old VBT, but I have no specs or other reference to
suppor this. Just do what the kernel does, that's what we're interested
in anyway.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2014-05-06 19:52:29 +03:00
Paulo Zanoni
574d62db39 tools/intel_reg_dumper: use haswell_debug_regs on BDW too
Instead of using an older set of registers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-04 13:33:13 -03:00
Daniel Vetter
4fdca96066 tools/quick_dump: Fix make distcheck
Someone really needs to fix this Makefile ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 17:54:58 +01:00
tgore
e599ff443c intel-gpu-tools: fix some include path problems on android builds
When building within the android tree (specifically in /external)
the compilation fails due to the wrong versions of some header files
getting picked up. This commit adds some include paths to ensure the
correct headers are found

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 17:50:44 +01:00
Jesse Barnes
2031da4073 intel_infoframes: remove bogus "being transmitted" check from VLV
This bit is reserved on VLV.
2014-03-27 11:10:18 -07:00
Jesse Barnes
c1c96d8342 intel_infoframes: add VLV support
Different reg offsets and such.
2014-03-27 11:01:36 -07:00
Ben Widawsky
47c551bd70 quick_dump: Put the cairo cflags with the other cflags.
I had been hoping we can avoid linking against cairo, but alas it was
not meant to be.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-27 09:56:59 -07:00
Daniel Vetter
9048aa1974 tools/quick_dump: re-apply ducttape
Someone with actual automake-fu really needs to fix this up for real
since compiling a bunch of source files again, with broken dep
tracking even just because we can't link against a .la somehow really
isn't too awesome.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 22:57:52 +01:00
Ben Widawsky
785a0cd4ba quick_dump: Fix the danvet fallout.
quick_dump built fine, but it could actually run, since a lot of the
linking happens at run time. There is one hack where we redefine the
environment stuff, since depending on igt_aux means we have to pull in
libdrm, which I do not want to do.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-26 09:02:58 -07: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
e49ceb8690 lib: unnecessary header removal for drmtest.h, part 1
Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:07:37 +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
Daniel Vetter
0e22f14ed6 tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.

Fix things up where assert instead of igt_assert was used.

One tiny step towards header sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:46 +01:00
Daniel Vetter
bff22f7317 lib: Move non-register things out of intel-gpu-tools.h
Right now almost everything in there concerns itself with register
access. Move everything else out (into drmtest.h for lack of better
place) to prepare for api documentation.

Also rename intel_drm.c to intel_os.c since it contains OS, not
drm abstractions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:37 +01:00
Daniel Vetter
266b26b3ed lib/intel_chipset: intel_ prefix for pch global
Just a bit better namespacing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 14:59:58 +01:00
Daniel Vetter
94e1b6af99 lib: rename intel_pci.c to intel_chipset.c
This is to consolidate all the chipset related functions to
intel_chipset.[hc].

Unfortunately we need to rename a wrapper lib file in quick_dump, too.
And quick_dump makes automake a bit unhappy apparently.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 14:47:21 +01:00
Ben Widawsky
d92c2cf1de intel_gtt: Dump the whole GTT
The tool formerly only dumped the aperture size, which is fine, but not
everything interesting. Most of the patch is just the variable rename.
The real work happens with using the BAR0 size divided by 2 instead of
the BAR2 size.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-19 10:14:57 -07:00
Ben Widawsky
00bd3eba11 quick_dump: gen8 private PAT
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-19 10:14:57 -07: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
Ben Widawsky
8ebc02a54c quick_dump: Add missed broadwell autodetect
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-21 13:15:35 -08:00
Rafael Barbalho
09bcb0ab4b android: Change tests & tools directory to use the lib directory
Instead of recompiling the lib directory for every tool or tests we can just
re-use the static library. This also has the nice side effect of fixing the
android "mm" command to allow android users to only rebuild the local changes
in either the test or tools directory.

Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-04 10:52:15 +00:00
Rafael Barbalho
4c79264b3c android: Clean-up common makefile directives
All the Android.mk files had the same directives to find the path of
libdrm & libpciaccess. These are no longer required as the android system
now allows the libraries being used to export include paths to dependant
modules & programs.

Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-04 10:52:06 +00:00
Ben Widawsky
e72f3bcc77 quick_dump/broadwell: Add gen7 ring mode registers
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-02 10:48:54 +01:00
Ben Widawsky
56d347fad8 quick_dump/haswell: Add gen7 stuff + VECS_MODE
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-02 10:48:54 +01:00
Ben Widawsky
556c200e99 quick_dump/gen7: Add other GFX_MODE registers
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-02 10:48:54 +01:00
Ben Widawsky
b5a1ab3d6e quick_dump: Add a file argument
-f, or --file will simply dump the file in the specified format. All
other options will be skipped. This is helpful when one wants to create
their own list for temporary debug, or if one requires a subset of
registers to work around things like fused off PCH.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-02 10:48:54 +01:00
Ben Widawsky
8ce7c366d7 quick_dump: Refactor to allow future code
Extract everything possible, and create a main function which is pretty
darn simple. The goal is to make the various paths the program can take
based on command line options (one more is coming) more decipherable.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-02 10:48:54 +01:00
Jesse Barnes
e558dd998d dpio: make dpio reg read/write output like normal reg read/write output
Just for consistency.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2014-01-28 14:00:39 -08:00
Jesse Barnes
81095305f4 mmio: use intel_iosf.c for DPIO reads and writes
This makes it a bit more like the kernel, so we can go poke at DPIO and
other IOSF regs a bit more easily.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2014-01-28 13:58:01 -08:00
Jesse Barnes
0d20fa3cc2 quick_dump: more vlv dpio regs 2014-01-27 10:27:20 -08:00
Chris Wilson
b5109e62ce intel_error_decode: Protect against missing ring registers
A dodgy kernel may miss printing out the ring registers leading to a
FPE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23 21:51:57 +00:00
Tvrtko Ursulin
4a9b70c326 tools: Allow building on Android after noinst_PROGRAMS is not defined any more
Looks like filter-out macro gets silently unhappy about an undefined variable.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-23 08:57:55 +00:00
Ben Widawsky
ac0224f184 quick_dump/watermarks: lp3, misc and debug
I forgot to git add this originally.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 11:01:58 -08:00
Ben Widawsky
3deaeb2826 quick_dump/broadwell: Use haswell_other
For now, the power controls and watermarks seem to be the same offsets.
So just reuse haswell_other.txt

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
58aa7346c3 quick_dump/hsw: Watermark debug
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
73ca22c9e8 quick_dump: Allow comments in the register files
Simple addition to the parser to add the following full line comments:
{';', '#', "//"}

Empty lines will also be ignored

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
724340cf36 quick_dump: Fix the indentation
Fix the spaces to use [the python standard] 4 soft spaces for tabe.
While here, add the proper vim tag so we don't do it again.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Daniel Vetter
e07e758004 tools: Install them all
No reason really not too, especially since we install manpages for
some of them.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66656
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-17 07:42:22 +01:00
Devon Davies
67c80f8d81 build: Added -UNDEBUG to tools/Android.mk
NDEBUG is defined by default in Android and causes assert(x) to be
defined as void(x). This change ensures that asserts work as
expected in tools.

This flag is already inside tests/Android.mk

Reviewed-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Devon Davies <devon.davies@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-08 17:20:00 +00:00
Damien Lespiau
0ec9c94bea tools: Remove intel_disable_clock_gating
This tool only supports ILK. I take the fact that nobody has felt the
need to update for later platform a sign it's not very useful.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:09 +00:00
Damien Lespiau
5fdca4c166 tools: Removed unused tools/intel_iosf_read.c
Also intel_iosf_read() does not exist, and would need a bit more
arguments.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:06 +00:00