180 Commits

Author SHA1 Message Date
Daniel Vetter
2a0b3488a0 tools: decode some more MI_ ops
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 17:22:28 +02:00
Daniel Vetter
206e129af0 tools: decode MI_SEMAPHORE_MBOX
Juggle the length check up to avoid duplication.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 10:10:07 +02:00
Daniel Vetter
079f839030 tools/intel_gpu_dump: add hackish --devid parsing
For bugreports and whatnotelse.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-06 21:47:43 +02:00
Eugeni Dodonov
15cb282187 intel_gpu_top: access hardware before running profiling command
Without this patch, intel_gpu_top will try to get access to the hardware
after running the profiling command in the background. In case such access
fails, the main process quits, but the background one will continue
running.

So let's move this test up, so it is done before we fork.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 20:04:17 -03:00
Eugeni Dodonov
8ad08546e5 intel_gpu_tools: describe -e option in usage screen
This patch adds a short description of '-e' option to the usage screen.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:59:40 -03:00
Eugeni Dodonov
b9d7c3a087 intel_gpu_top: adopt to kernel coding style
This patch fixes adopts the code to the kernel coding_style.
2011-09-05 19:50:52 -03:00
Eugeni Dodonov
a483c97d91 intel_gpu_top: support profiling user-specified commands
This patch adds support for running intel_gpu_top to profile specific
commands. The required command will be carried out in separate process,
and main intel_gpu_top will leave when the child process will exit.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:45:01 -03:00
Eugeni Dodonov
c2983f24e3 intel_gpu_top: support non-interactive mode
This patch adds support for non-interactive mode, invoked by running with
'-o output' switch. In this case, no interactive output is being
performed, but the execution statistics are being saved into the output
file.

The output file is generated in both human and gnuplot-readable format.

Unlike interactive mode, where non-supported pipes and non-active
registers are skipped, the content of such pipes and registers is recorded
into the log file to simplify parsing and standardize the list of columns.

Also, unlike interactive mode, the registers are not sorted according to
the usage - this way, their variation over time can be analysed offline.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:45:01 -03:00
Eugeni Dodonov
83047e9a5e This patch initializes the last_stats[] for registers prior to starting
the monitoring itself. This way, the first measure will already contain
the difference from the previous value instead of non-initialized value.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:35:44 -03:00
Eugeni Dodonov
f11f8d9aac Revert "intel_gpu_top: initialize monitoring statistics at startup"
This reverts commit 431fe7803d37f344275fdaceb57c1fbaeee8541c.

Will be replaced with more fine-grained commits.
2011-09-05 19:33:40 -03:00
Eugeni Dodonov
431fe7803d intel_gpu_top: initialize monitoring statistics at startup
This patch initializes the last_stats[] for registers prior to starting
the monitoring itself. This way, the first measure will already contain
the difference from the previous value instead of non-initialized value.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:13:58 -03:00
Eugeni Dodonov
4b0a15e45d intel_gpu_tool: initial support for non-screen output
This patch adds initial support for non-stdio output, to be used for
non-interactive monitoring.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-09-05 19:11:49 -03:00
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