351 Commits

Author SHA1 Message Date
Mika Kuoppala
edee952e6a tools/inter_error_decode: decode for ctl and acthd
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-16 15:18:56 +02:00
Daniel Vetter
9ee41661de tools/quickdump: gitignore generated files
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-10 15:35:13 +02:00
Daniel Vetter
037847a102 tools/intel_reg_dumper: fix up END register
I'm full of fail ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-09 23:04:20 +02:00
Daniel Vetter
d3221334d2 tools/intel_reg_dumper: add gen6+ fences
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-09 10:46:09 +02:00
Paulo Zanoni
a7e7d08513 intel_reg_dumper: enable the power well
The intel_reg_dumper tool reads a lot of display registers. If we
don't turn on the power well, dmesg will get flooded with tons of
messages about unclaimed registers. So here we enable the "Debug"
power well register and then restore its state later. It's impossible
to guarantee that other things won't mess with the debug register
between our put and get calls, but at least we're trying our best to
keep things working fine, and it's the debug register anyway.

As far as I know, nothing else uses the Debug register for anything,
so we should be safe for now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-07-03 14:49:09 -03:00
Paulo Zanoni
c013bb02e6 intel_reg_dumper: add hsw_debug_lp_wm
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-07-03 14:49:09 -03:00
Ville Syrjälä
b84b9e230c quick_dump: Add VLV DPIO registers
Add the names of all VLV DPIO registers.

v2: Use the third element to signal DPIO registers, and split
    the code changes to a separate patch

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-06-30 22:06:40 -07:00
Ville Syrjälä
e87c2536f6 quick_dump: Document the register definition format
Add a small comment about what the elements in the register
tuple mean.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-06-30 22:06:38 -07:00
Ville Syrjälä
de92969a40 quick_dump: Add automagic DPIO register support
Repurpose the (currently unused) third element in the register
definition tuple to indicate the type of the register. 'DPIO'
is the only special register type for now.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-06-30 22:06:35 -07:00
Jani Nikula
5bb0897f73 quick_dump: vlv mipi dsi register support
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-06-07 11:35:27 -07:00
Ben Widawsky
55876338fa quick_dump: fix text file
I accidentally pushed
commit a08d62257dbdc8f4d3f5e655e0ba7bd192af37ff
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Thu May 23 11:03:25 2013 -0700

    quick_dump: Add CCID

before I was ready, in order to get the mmio fix in. This fixes a parse
error in quick_dump.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-23 11:17:31 -07:00
Ben Widawsky
a08d62257d quick_dump: Add CCID
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-23 11:03:25 -07:00
Ben Widawsky
1109c5acfd quick_dump: Add basic haswell support
Mostly using the IVB registers + a few I grabbed from i915_reg.h

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-22 16:15:04 -07:00
Ben Widawsky
099a92ea28 quick_dump: Add more ring registers
START + CTL (and reorder them in the file)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-22 15:54:53 -07:00
Damien Lespiau
cc6c254ae9 reg_dumper: Shut a warning down
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:39 +01:00
Damien Lespiau
ec3e7a66f0 Update .gitignore files with the new tests and tools
Also sort them.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:31 +01:00
Ben Widawsky
8be812b86c intel_mmio: Add intel_register_access_needs_fakewake
I screwed this up in my recent patch:
commit c7b6ec50007e2e524a208572c34faf1380eeab1b
Author: Ben Widawsky <ben@bwidawsk.net>
Date:   Wed Apr 24 19:05:18 2013 -0700

    clean warnings: Silence unused (or private) functions

I've clarified the functions now, and added the proper call from the
python script.

Time to get a regression tester for our tools?

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-26 14:34:48 -07:00
Jesse Barnes
d6917cf72d add punit and nc read/write tools for vlv
Good for testing/debugging.
2013-04-25 14:43:23 -07:00
Ben Widawsky
afeb43190e intel_error_decode: HEAD stuff
Show the decoded HEAD value, as well as print the calculated head offset
per ringbuffer.

This will be superceded in the next commit, but that patch is way more
complicated than this one (read: error prone), so I want this here.

Example:
ringbuffer (blitter ring) at 0x00044000; HEAD points to: 0x00044950

v2: Actually make it work for all rings.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-23 09:20:55 -07:00
Ben Widawsky
155aa1e1fa intel_error_decode: Whitespacing fix
The rest of igt has moved to kernel coding style. People had already
been not conforming with the existing formatting in error decode, so we
may as well fix it.

This addresses two primary issues, tabbing (remove spaces), and space
after function in function call. I may have missed some of the latter
since that was done by hand.

I have upcoming work in this file, and it was annoying me.

v2: Fix case alignment (Chris)

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-23 09:20:45 -07:00
Ben Widawsky
6f0d8b011e quick_dump: Add dpio read
The sample usage is in reg_access.dpio_read(). We should add some
semantics to the text files to detect DPIO registers, and do the right
thing.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-17 19:02:41 +02:00
Ben Widawsky
a59b0ee5d4 reg_access: Forcewake as necessary
Don't try to be smart. Just poke all forcewake bits if it seems we need
it.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-16 14:06:02 -07:00
Ben Widawsky
67ed990604 quick_dump: add register write
Since there is no command line support, just do a pure integer version

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-16 14:06:02 -07:00
Ben Widawsky
ec107b0194 quick_dump: say something when reg init fails
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-16 14:06:02 -07:00
Jesse Barnes
0b7da0afb1 fixup VLV reg offsets, add a few more 2013-04-16 13:41:23 -07:00
Jesse Barnes
25339595a7 add VLV punit & north cluster read tools 2013-04-16 13:41:23 -07:00
Paulo Zanoni
b0c63a781d intel_reg_dumper: improve the dumping of backlight registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-04-09 13:52:54 -03:00
Kenneth Graunke
43a0862697 intel_perf_counters: Add support for Sandybridge.
While the Sandybridge PRM doesn't have any documentation on the GPU's
performance counters, a lot of information can be gleaned from the older
Ironlake PRM.  Oddly, none of the information documented there actually
appears to apply to Ironlake.  However, it apparently works just great
on Sandybridge.

Since this information has all been publicly available on the internet
for around three years, we can use it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:52 +01:00
Kenneth Graunke
0811556747 intel_perf_counters: Abstract out Ironlake-specific code.
We want to support this tool on more platforms.  This lays the
groundwork for making that possible.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:45 +01:00
Eric Anholt
85667f4f7d intel_perf_counters: a little tool for dumping performance counters.
This reads the GPU's performance counters via MI_REPORT_PERF_COUNT and
prints them in a top-style interface.  While it can be useful in and of
itself, it also documents the performance counters and lets us verify
that they're working.

Currently, it only supports Ironlake.

v2 [Ken]: Rebase on master and fix compilation failures; make it abort
on non-Ironlake platforms to avoid GPU hangs; rename from 'chaps' to
intel_perf_counters since that acronym isn't used any longer; write the
above commit message.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:28:41 +01:00
Paulo Zanoni
7253eb4e4f intel_reg_dumper: debug SDEISR on Haswell
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
051e327247 intel_reg_dumper: dump HSW watermark registers
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
eb88ce64b7 intel_reg_dumper: decode some useful Haswell registers
I've checked the value of these registers many many many times during
development.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
5c0ce0f2a9 intel_reg_dumper: make Haswell dump useful
It was previously printing ironlake_debug_regs and haswell_debug_regs.
Since ironlake_debug_regs contains a lot of registers that don't exist
on Haswell, running intel_reg_dumper on Haswell caused "unclaimed
register" messages. Now I've copied the existing registers from
ironlake_debug_regs to haswell_debug_regs, so we won't print the
registers that don't exist anymore.

Also removed DP_TP_STATUS_A since it doesn't exist.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Paulo Zanoni
2fadf695ff intel_reg_dumper: recognize LPT
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-03-22 14:45:06 -03:00
Damien Lespiau
7ee278f176 build: Guard the inclusions of config.h with HAVE_CONFIG_H
autoconf can be configured to not generate a config.h but to give the
defines with command line arguments instead. In this case, there's no
config.h to include.

To work in both cases autoconf adds a HAVE_CONFIG_H define on the command
line to signal there's a config.h to include.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:45:34 +00:00
Ben Widawsky
2155b16af2 quick_dump: prettier printing
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-21 18:31:20 -08:00
Matt Turner
05795daebf quick_dump: Makefile.am best practices and fix distcheck
A few changes
  - Put CPPFLAGS in AM_CPPFLAGS instead of a per-target CFLAGS var;
  - Use _LIBS/_CFLAGS from pkg-config instead of hard-coded values;
  - List non-generated scripts in dist_bin_SCRIPTS;
  - Add chipset.py to the run that implicitly generates it, which fixes
    distcheck.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-08 12:04:43 -08:00
Ben Widawsky
6b77e04560 quick_dump: chdir us to where the text files are
This is useful if you run out of the quick_dump directory.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:58:17 -08:00
Ben Widawsky
1cce7eb21b quick_dump: Give dumper an AM_CONDITIONAL
It may sometimes be undesirable to build or install the quick dumper.
This was requested by Damien.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:22:00 -08:00
Ben Widawsky
1f2e037e8f quick_dump: Use the register access library
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:22:00 -08:00
Ben Widawsky
beb5de858d quick_dump: Connect libpciaccess and other utils
Make a register access library with sample to do register reads

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:21:55 -08:00
Ben Widawsky
6437eed930 quick_dump: SWIG chipset interface
This isn't strictly necessary it would have been easy enough to simply
convert intel_chipset.h but this should be nice prep work for directly
doing MMIO. It also serves as a nice review point.

It's demonstrated with an autodetect function in the script. That
autodetect has a hardcoded path that shouldn't be there, but it will go
away in the next patch when we can properly link in libpciaccess.

Thanks to Matt for helping whip the automake stuff into shape.

v2: Switch to $(top_srcdir)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:21:17 -08:00
Ben Widawsky
ebc918601e quick_dump: vlv support
This patch includes a patch from Jesse which removed a bunch of VLV
registers which were useless in my original RFC.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
b96821cb39 quick_dump: gen7 support
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
45cc039e31 quick_dump: gen6 support
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
ac1634e23c quick_dump: A dump utility different than reg_dumper
This is the base tool for quick dump. At it's heart, quick dump is
simply a basic text parsing thingie which plugs into intel-gpu-tools to
do something similar to intel_reg_dumper.

The format for the register definition files is very open, so it's just
something simple for now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
f5c3e5811e intel_gtt: Fix PTE offsets
Vincent sent me a patch which I think didn't go far enough.

Honestly, I don't even know what this tool does.

Reported-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-04 17:53:48 -08:00
Chris Wilson
f9c8e365e9 intel_error_decode: Don't barf on a malformed PCI ID line
Whoops, someone added UTS_RELEASE with no newline before PCI ID which
upsets our naive parser.
2013-02-04 21:42:21 +00:00
Thomas Jarosch
cda8bee056 Fix out of bounds memory access
cppcheck reported:
[tools/intel_infoframes.c:836]: (error) Width 31 given in format string
(no. 1) is larger than destination buffer 'option[16]',
use %15s to prevent overflowing it.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-06 18:20:47 +01:00