511 Commits

Author SHA1 Message Date
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
Ben Widawsky
54ed938d39 clang: Fix warnings found through clang.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:19:10 -07:00
Chris Wilson
a4783f9485 intel_gtt: Harden against changes to kernel mappings of the GTT
Rather than use the common mmio segment which will be in future
restricted to just the registers and so exclude the GTT portion on all
architectures, explicitly mmap the GTT ourselves. Repeat this mmapping
with a couple of flags until we matching the existing kernel mapping.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-27 09:34:30 +02:00
Daniel Vetter
3d148e164d s/NO_PID/NOP_ID
Alan typo'ed it, I've failed to notice :(
2012-08-25 00:01:27 +02:00
Alan Coopersmith
6b3e6f28d2 Rename NOPID to NO_PID to avoid conflict with Solaris NOPID
Solaris <sys/types.h> already has #define NOPID (pid_t)(-1)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:22 +02:00
Ben Widawsky
ea944a9faf intel_reg_read: use strtol instead of atoi
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-23 11:32:57 -07:00
Ben Widawsky
baf026d692 intel_reg_read: support -c option to read multiple dwords
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-23 11:29:43 -07:00
Vijay Purushothaman
4fc76adf31 tools: Added intel_dpio_read and intel_dpio_write
In Valleyview the DPLL and lane control registers are accessible only
through side band fabric called DPIO. Added two tools to read and write
registers residing in this space.

v2: Moved the core read/write functions to lib/intel_dpio.c based on
Ben's feedback

Signed-off-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-21 09:30:29 +02: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
Daniel Vetter
0efa6c7b27 tools/reg_dumper: really dump pipe C regs
Not just a copy of pipe B. Meh.

Also kill a few redudant #define for pipe B - they match pipe A.
2012-08-08 22:05:14 +02:00
Daniel Vetter
f56a289aa8 tools/reg_dumper: dump pipe C regs
Also reorder the pipe B regs a bit to be consisten with pipe A.
2012-08-07 14:50:54 +02:00
Eugeni Dodonov
c6fe31bc47 intel_reg_dumper: use intel_register_access_init/fini
We need to hold forcewake lock in order to be able to read GT registers.
Otherwise, when the GPU is in RC6 mode, we'll read all zeros.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-06-21 14:31:34 -03:00
Eugeni Dodonov
b28a399dcd intel_reg_dumper: dump more PM registers
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-06-13 15:50:44 -03:00
Daniel Vetter
9739401fb5 intel_reg_dumper: dump pre-pch-split blc regs 2012-06-07 16:37:02 +02:00
Daniel Vetter
55fdd7f1bb cleanups after l3_parity merge
- call it sysfs_l3_parity for more consistency
- add .gitignore for intel_l3_parity
2012-05-31 15:20:12 +02:00
Ben Widawsky
8f7ea34751 tools/dpf: Tool to read and write l3 remap registers.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-05-31 15:20:12 +02:00
Daniel Vetter
662d732199 lib: extract kmstest_create_fb
We should get more kms tests soon, and not needing to copy-paste a
nice test pattern should be useful.

That establishes a firm depency of i-g-t on cairo over everything, but
I don't care so much about that.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 15:56:29 +02:00
Paulo Zanoni
984e44f88b intel_infoframes: options -p and -P require an argument
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2012-05-16 17:07:29 -03:00
Eugeni Dodonov
e6b264cce7 intel_gpu_top: allow to work on Gen7
Somehow nobody noticed this before, but we were missing blt and bsd6
initialization on Gen7.

Reported-by: Philippe Lecluse <philippe.lecluse@intel.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-05-16 10:14:55 -03:00
Chris Wilson
412e7b341f intel_error_decode: Be more lax for whitespace around parsing PCI-ID
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-09 13:50:53 +01:00
Eugeni Dodonov
3986d9faf3 tools: add Haswell registers into intel_reg_dumper
For now, only print their content for diffing, but also add the necessary
bits that can be used for more verbose output in the fugure.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-08 21:14:20 +02:00
Ben Widawsky
c6f42f4cca intel_infoframe: fix assertion off by 1
this makes my compiler very unhappy

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-04-28 20:10:09 -07:00
Paulo Zanoni
9898083fa2 intel_infoframes: add support for Gen 4
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-25 23:07:09 +02:00
Paulo Zanoni
0611af4a33 intel_infoframes: AVI InfoFrame version should be 2
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-25 23:06:52 +02:00
Paulo Zanoni
fd58520796 Add tools/intel_infoframes
This is a command-line tool that allows us to display and modify the
InfoFrames we send.

v2: use argv instead of stdin

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-13 15:48:08 +02:00
Daniel Vetter
c4ae3bc412 update .gitingore 2012-03-20 14:26:31 +01:00