168 Commits

Author SHA1 Message Date
Eugeni Dodonov
09e4b0cd26 intel_gpu_top: suport command line parameters and variable samples per
second

This patch adds support for getopt, and adds two default parameters to it:
-h to show usage notes; and -s to allow user to define number of samples
to acquire per second.

Manpage documentation is also adjusted accordingly.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:11:45 -03:00
Eugeni Dodonov
6194c75c8f intel_gpu_top: account for time spent in syscalls
This allows intel_gpu_top to properly account for time spent inside system
calls. Effectively, with previous implementation, intel_gpu_top could
spent longer than 1s between consecutive measures. This attempts to
minimize the extra time spent while polling for data.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 16:18:11 -03:00
Eric Anholt
e40c9c7faf Add missing copyright info to intel_decode.c 2011-08-01 10:40:20 -07:00
Ben Widawsky
c82c1d6846 intel-gpu-tools/forcewaked: sample forcewake app
This app is required for debug features which seem to (undocumented)
reset themselves if/when the GT goes to sleep.

It is also useful for those doing general debugging or profiling from
userspace when they do not wish to have the GT sleep.

v2: made forcewaked more daemon-like

Cc: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-28 13:48:51 -07:00
Chris Wilson
294927c601 Add intel_backlight
A trivial tool to adjust the backlight registers (gen5+ only atm).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-20 20:41:54 +01:00
Chris Wilson
30ffcc34ea intel_decode: Handle a few gen7 blocks 2011-07-20 20:41:54 +01: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
Chris Wilson
aadfcdfd4e decode: Fix segmentation fault
The decode for A8 is incomplete and died with a segfault. First hide the
segfault, latter fix the pretty printing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-05 18:13:18 +01:00
Eric Anholt
d73cdde45a Add Ivybridge support to intel_gpu_dump and the BLT tests. 2011-05-17 17:54:26 -07:00
Daniel Vetter
1c9ede3acb intel_decode: drop unused code
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-05 21:14:54 +02:00
Chris Wilson
841c551f12 decode: Correct a couple of mistakes in gen3 IMMEDIATE_STATE_1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-04-05 08:52:52 +01:00
Forest Bond
d641f0fd42 intel_bios_dumper: handle rom_size == 0
Some versions of libpciaccess on Linux set rom_size to 0 for VGA
devices.  While this behavior may change, intel_bios_dumper should
handle this situation to be compatible with current versions of the
library.

This fixes segmentation faults on affected systems.

Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-22 14:44:25 +00:00
Daniel Vetter
02014cee2a Decode map state on gen2
At least the important stuff.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-14 13:03:48 +01:00
Daniel Vetter
cf5db1161a Decode gen2/gen3 fences in the error_state
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-14 11:20:17 +01:00
Daniel Vetter
afe492549d Decode 3DSTATE_CLEAR_PARAMETERS
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-06 00:12:10 +01:00
Daniel Vetter
ad27fac946 Small cleanups for immediate state S5
And a tiny fix.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-06 00:12:10 +01:00
Daniel Vetter
03c1e334b8 Fully decode sampler state
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-04 16:41:07 +01:00
Daniel Vetter
f14877f2de Fully decode map state
A few odd things were missing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-04 15:58:00 +01:00
Daniel Vetter
673d5bcea0 Decode 3DSTATE_LOAD_INDIRECT
The remaining stuff + cleanups.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-04 14:31:04 +01:00
Daniel Vetter
75c403e923 Decode 3DSTATE_LOAD_INDIRECT S0-S4
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-04 12:50:48 +01:00
Daniel Vetter
1e8713fdaa Decode scissor state
Not absolutely paranoid, who cares.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-03 21:29:27 +01:00
Daniel Vetter
01ac8b9099 Decode 3DSTATE_DRAWING_RECTANGLE
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-03 21:23:22 +01:00
Daniel Vetter
05309ebfe4 Decode MS3 tex format
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-03 21:23:22 +01:00
Chris Wilson
1f35267948 decode: Fix pretty printing of 3DSTATE_URB allocation size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-02 16:06:00 +00:00
Chris Wilson
1c05f89ceb decode: fix gen6 PS binding table update bit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-02 14:48:20 +00:00
Daniel Vetter
eb777071d7 Decode MS3 tex format
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-01 00:01:34 +01:00
Daniel Vetter
8348e69561 Decode depth buffer format
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-02-28 22:51:47 +01:00
Ben Widawsky
14bed666f4 Add MI_SUSPEND_FLUSH instruction decode
Signed-off-by: Ben Widawsky <bwidawsk@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-24 00:35:36 +00:00
Chris Wilson
41570d9bf5 Remove confusing use of IS_9XX
... and test for what we mean instead.

Reported-by: Diego Celix <dcelix@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-14 15:57:40 +00:00
Chris Wilson
d75f2632c1 intel_stepping: Include clocks in summary
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 11:20:20 +00:00
Chris Wilson
592b1a51ff tools/intel_bios_reader: use correct printf format for size_t
intel_bios_reader.c: In function ‘dump_backlight_info’:
intel_bios_reader.c:192:22: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ [-Wformat]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 11:00:49 +00:00
Chris Wilson
73dd92f85b tools/intel_disable_clock_gating: Remove unused variable
intel_disable_clock_gating.c: In function ‘main’:
intel_disable_clock_gating.c:38:11: warning: unused variable ‘temp’ [-Wunused-variable]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 10:59:54 +00:00
Chris Wilson
56167d8bfd tools: Do not install intel_gpu_dump
It has been supersede by intel_error_decode for the user-facing role of
obtaining debug info after a crash.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 10:56:27 +00:00
Chris Wilson
c407041ebb tools/intel_gpu_dump: Replace asprintf with snprintf
The maximum filename is limited so we can simply use a large buffer
rather than fail to check the error return from asprintf.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 10:54:39 +00:00
Chris Wilson
2c9b293927 tests/intel_reg_dumper: Replace asprintf with snprintf
Stops the compiler warning about not checking the potential error return
from asprintf, which was a false positive anyway.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-10 10:50:48 +00:00
Chris Wilson
68a95f0e38 error decode: Search for first i915_error_state
Handy for multi-GPU systems where the IGFX may not be first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-01 13:37:56 +00:00
Chris Wilson
3c5c8ba71c Search for the first Intel dri device.
This is vital in a multi-GPU system so that we only test the Intel card
and not the discrete GPUs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-02-01 13:37:04 +00:00
Chris Wilson
281285ec70 bios: Parse SDVO panel DTDs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-29 16:13:38 +00:00
Chris Wilson
afaf5ef27c gpu-top: Correct computation of ring size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-09 14:48:03 +00:00
Chris Wilson
98eb5a5e24 error: Parse ring name before gtt_offset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-09 13:27:22 +00:00
Chris Wilson
d9ec63b1a0 intel_gpu_top: Include BLT ring
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-07 19:59:00 +00:00
Chris Wilson
5503ac9e19 intel_gpu_top: Wake the GT power well to read gen6 ring registers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-01-07 19:58:55 +00:00
Chris Wilson
4f20844247 error decode: print out class of chipset in the error report
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-23 19:44:14 +00:00
Jesse Barnes
322563027c tools/bios_reader: try to dump more child device data
Some of our device class defines were incorrect, and we were missing
several recent ones, so fix those up and dump more child device data if
we have it.
2010-12-21 12:06:00 -08:00
Eric Anholt
253acc34af intel_disable_clock_gating: New tool for turning off clock gating on ILK.
This is something I sometimes want to do in testing, to see if a
mystery bug (say, 29172) is due to broken clock gating.  Sadly, in
this case it isn't.  Note that it isn't supported on non-ILK chipsets
yet.
2010-12-16 16:48:29 -08:00
Eric Anholt
19b412b37c intel_gpu_top: Print stats regs on Ironlake as well. 2010-12-16 16:47:03 -08:00
Chris Wilson
292ae4538a error-decode: stdin is 0 not 1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-10 15:31:59 +00:00
Chris Wilson
94de0b46b5 decode: Add a couple of BLT MI.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-04 14:12:19 +00:00
Chris Wilson
1e4cf7dbbe gpu-dump: Include BLT and BSD ringbuffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-04 11:42:17 +00:00
Chris Wilson
157207ada5 decode: Add some missing protection against short buffers for gen6 instr
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-12-03 00:41:43 +00:00