337 Commits

Author SHA1 Message Date
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
Rodrigo Vivi
c0a74d8d50 tools: intel_gpu_abrt bug report template.
checking if file has been generated and output a template for a good bug report
2012-12-13 18:15:38 +01:00
Rodrigo Vivi
3ab148331a tools: intel_gpu_abrt checking for root access
needed by other igt tools that are collecting more usefull information.
2012-12-13 18:15:34 +01:00
Rodrigo Vivi
616a4de567 tools: intel_gpu_abrt collecting more useful info 2012-12-13 18:15:32 +01:00
Rodrigo Vivi
7150a04124 tools: intel_gpu_abrt "get" function
A function to make it easy to collect any file or directory needed later.
2012-12-13 18:15:29 +01:00
Daniel Vetter
da6473184c tools/intel_reg_dumper: add some cpt/ppt debug regs
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:57:36 +01:00
Imre Deak
9de58cf6c1 fix warn in intel_reg_snapshot: ignoring return value of 'write'
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:07 +02:00
Imre Deak
5efd3d3d22 fix warn in intel_error_decode: ignoring return value of 'asprintf'
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:05 +02:00
Damien Lespiau
4650505d7e intel_infoframes: Dump HDMI vendor infoframes
Those infoframes are programmed when using stereo 3D modes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-27 08:43:48 +02:00
Damien Lespiau
209ab470f2 tools: Update gitignore with intel_dpio_{read, write}
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-07 14:13:52 +02:00
Damien Lespiau
c8b93b8b77 intel_reg_dumper: Add more information when dumping single registers
Now that we can dump registers giving a partial name, adding more
information about the dumped registers seems useful.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
62a026eac5 intel_reg_dumper: Allow partial register names on the command line
Let people give just a part of the register name. Handy when not
remembering the exact name or if the register is defined with a
different name than the one in the spec being looked at.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
763d22cbf8 intel_reg_dumper: Also decode registers given by address
One can now give an address instead of a register name to decode a
single register.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Damien Lespiau
2fd80079c0 intel_reg_dumper: Add a single register decode mode
From time to time, one would like to decode a register value that have
been captured at a certain point in time (and say printed out with a
printk). intel_reg_dumper has all the knowledge to do that and this
patch adds a way to ask it to decode a value.

Example usage:

$ ./tools/intel_reg_dumper PCH_PP_CONTROL 0xabcd0002
       PCH_PP_CONTROL: 0xabcd0002 (blacklight disabled, power...

v2: friendlier invocation (Chris Wilson)
v3: remove unecessary casts and use strcasecmp (Jani Nikula)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-04 13:55:10 +02:00
Ben Widawsky
bc62567b77 clang: Fix static analysis warnings from clang
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:20:52 -07:00