70 Commits

Author SHA1 Message Date
Rodrigo Vivi
50534460dd tools/intel_reg_dumper: Shows fences and rp debug regs on BDW+.
v2: a more generic fix to cover current and future platforms (Damien).

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2014-09-17 14:23:10 -04: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
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
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
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
Damien Lespiau
a1baf3050e lib: Use INSTDONE_I965 and INSTDONE_1 for gen6
The GEN6_INSTDONE_1 and GEN6_INSTDONE_2 registers are just the old
INSTDONE_I965 and INSTDONE_1 registers but renamed. Let's use the old
names (this is what the kernel does).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:48:04 +00:00
Damien Lespiau
d8b1dee220 intel_reg: Renamed INST_DONE to INSTDONE
That's how the registers are named in the kernel defines.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-07 16:47:33 +00:00
Paulo Zanoni
d5cdee95d5 lib: rename some power well bit names
I did the same change in the Kernel a few months ago. This should help
not getting confused about which bit does what.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-06 13:10:36 -02:00
Daniel Vetter
3c55a7df57 tools/reg_dumper: Add FW_BLC regs
Debugging watermark issues on gen2/3 without them is hard ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-20 11:00:17 +01:00
Paulo Zanoni
e98a06d593 intel_reg_dumper: fix "enable" at hsw_debug_lp_wm
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-10-21 13:28:11 -02:00
Ben Widawsky
c42f344b78 intel_reg_dumper: Silence GCC for uninitialized clock
GCC 4.8.1 seems to think clock may be uninitialized.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07: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
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
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
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
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
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
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
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
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
Eric Anholt
732547793f intel_reg_dumper: Add dumping of GPU turbo regs.
I was interested in finding why my IVB system is not getting GPU turbo
after suspend/resume.  The piece that looks weird to me is that
INTERRUPT_THRESHOLD is sitting at 0, whereas pre-suspend it's
0x12000000.
2012-02-22 10:45:01 +01:00
Eric Anholt
6624325f13 reg_dumper: Refactor duplicated reg-dumping code. 2012-02-22 10:44:42 +01:00
Daniel Vetter
8bedcae848 tests/intel_reg_dumper: s/pipe/disp_pipe/ to shut off the compiler
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 12:26:23 +01:00
Paulo Zanoni
ecad594e02 reg_dumper: change and fix behavior when using dump files
Before this patch, handling dump files was wrong:
- when HAS_PCH_SPLIT was specified, intel_reg_dumper segfaulted inside
  intel_check_pch()
- the "devid" variable was used but not set
- there was no way to specify the device id of the machine used to
  generate the dump file

This patch fixes this behavior with the following changes:
- the HAS_PCH_SPLIT variable is gone
- there is now a '-d' argument that can be used to specify the device id
  used to interpret the results
- when a dump file is used but the '-d' argument is not provided, an
  Ironlake machine is assumed

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:30 +01:00
Paulo Zanoni
ad87b06fd6 reg_dumper: add interlaced information to TRANSCONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:28 +01:00
Paulo Zanoni
3310db08d8 reg_dumper: add interlaced and rotation information to PIPECONF
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-16 00:01:25 +01:00
Daniel Vetter
611e0cb333 intel_reg_dumper: add TRANS_VSYNCSHIFT
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-27 18:50:21 +01:00
Daniel Vetter
5774fadf7d tools/intel_reg_dumper: fixup new warnings
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-09 23:38:29 +01:00
Eugeni Dodonov
47a5bc505c tools/intel_reg_dumper: retrieve rc6 residency values
This allows to check if rc6 works, and how long have we been in each
state.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-01-03 15:18:06 -02:00
Eugeni Dodonov
1649ab350f tools/intel_reg_dumper: Add support for debug register
Right now, we only check for hardware DRRS support. But much more can be
done with it. Some day.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2012-01-03 15:18:06 -02:00
Jesse Barnes
2b484c16dd intel_reg_dumper: handle 3 pipe configs when dumping HDMI config
Could be on pipe A, B, or C.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-28 08:54:50 -07:00
Jesse Barnes
1708580217 intel_reg_dumper: use none instead of NULL if no port is assigned to TRANS_DP
Makes the output a little more readable.
2011-10-11 11:37:25 -07:00
Chris Wilson
4c0176e497 intel_reg_dumper: Slightly tidy the reporting of pipe configs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08 14:55:36 +01:00