1873 Commits

Author SHA1 Message Date
Daniel Vetter
d42b7f9189 lib/batch: hackish interface to run batches on specific rings
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 17:24:16 +02:00
Daniel Vetter
49cd753a77 test/gem_storedw_*: tune some more
MI_*/PIPE_CONTROL writes need to be in DOMAIN_INSTRUCTION, because
that is what mesa uses and I plan to use this to work around a
gen6 ppgtt issue.

Also testing with intentionally b0rked GFX_MODE on my snb shows that
we need to increase the loop counter a bit to reliably hit the tlb
invalidation problem. Test still completes within a few seconds.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 17:24:16 +02:00
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
Paulo Zanoni
2a7778d4e3 gem_vmap_blits: fix compilation if I915_PARAM_HAS_VMAP is not defined
Previously, "make check" failed because the main() function was not
defined.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-06 21:47:15 +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
Jesse Barnes
922214f986 tests: add store dword tests
Add a couple of simple store dword tests to test memory coherence.

gem_storedw_loop simply executes a batch that continually stores an
incremented value to a target buffer object, checking the results after
each batch completes.

gem_storedw_batches_loop does the same thing, but creates a new command
batch buffer for each iteration, which can exercise the buffer creation
code.  This test is based on one from Andrzej Kacprowski from Intel.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-08-12 12:51:34 -07:00
Hai Lan
6857a1af81 testdisplay: for tiled mode test, the height should be aligned
Signed-off-by: Hai Lan <hai.lan@intel.com>
2011-08-12 11:44:03 -07:00
Eric Anholt
e40c9c7faf Add missing copyright info to intel_decode.c 2011-08-01 10:40:20 -07:00
Ben Widawsky
3b10b7bd5a tools: readme addition for shader debugging 2011-07-28 15:09:47 -07:00
Ben Widawsky
d0a7e0ab5a tools/range handing: forgot the register map file :( 2011-07-28 15:07:36 -07:00
Ben Widawsky
62873796c4 intel-gpu-tools/debugging: shader debugger
high level summary of the files:
  * debug_rdata - get current state from debug registers. Helpful
    when developing the debugger, and could serve some purpose in the
    future.
  * eudb - the debugger itself
  * eviction_macro - generate the proper macro to flush the EU render
    cache until I get control flow working
  * pre_cpp - an evaluating c preprocesser like thing, to be used before
    cpp
  * sr - the system routine, exception handler which runs on the EU
  * test - a very basic test system routine
  * debug.h
2011-07-28 14:26:57 -07:00
Ben Widawsky
e39b13d7e4 intel-gpu-tools/debugging: add important debug regs
Cc: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-28 13:52:28 -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
Ben Widawsky
abd7038e5a intel-gpu-tools/range handling: register range handling
Hooks to allow safe accesses from userspace. Can revert to old behavior
by using unsafe access.
2011-07-28 13:48:51 -07:00
Ben Widawsky
cac8f8b526 forcewake: Add mmio code to do proper forcewake stuff for gen6 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
Daniel Vetter
74670c7bb9 gem_stress: ducttaping mandatory
In other news: We've been missing a unmapping_mapping_range somewhere
in the kernel. But lazy me never came around to digging up the real
cause.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-07-17 23:33:27 +02:00
Hai Lan
6cc92bcbc5 testdisplay: Test the first mode if there is no preferred mode.
For a TV device, there  might be no preferred mode. In this case,
we can test the first mode.

Signed-off-by: Hai Lan <hai.lan@intel.com>
2011-07-13 14:05:54 +08:00
Chris Wilson
25b25b907d tests/gem_vmap_blits: Fix typo
Why, oh why, do these only become obvious after pushing upstream?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08 15:02:18 +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
a0a0b6ab34 Add a test case for coherency of vmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08 14:54:32 +01:00
Chris Wilson
75f7e81fbc gem_stress: Assert we have no pending ops when using the CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08 14:04:24 +01:00
Chris Wilson
f40d54e132 gem_gtt_speed: Add option for variable buffer size 2011-07-08 14:03:28 +01:00
Chris Wilson
4227da8c3c gem_stress: Add an option to test handling of signals
As signals cause the syscalls to be interrupted, we often need to clean
up partial state before returning to userspace. Often a source of
unamusing bugs, so encourage gem_stress to provoke them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-02 09:13:20 +01:00
Chris Wilson
8908055da6 tests: Add an exercise for zero-length buffers
Triggers an OOPS with dmar enabled currently.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-23 14:06:45 +01:00
Chris Wilson
9de433a471 tests: Add a simple exercise of GTT mmaps
Test copying between 2 mappings and reading/writing from and to.

References: https://bugs.freedesktop.org/show_bug.cgi?id=38115
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-20 13:55:36 +01:00
Daniel Vetter
336f85dafb gem_stress: some stats about incoherencies
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 22:02:52 +02:00
Daniel Vetter
1007956680 gem_stress: option to disable render copyfunc check
Too noisy - which is an another way of saying too broken :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 20:30:31 +02:00
Daniel Vetter
5b253cee37 gem_stress: option for tile_size
I want to know how large these corruptions can get!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 20:30:30 +02:00
Daniel Vetter
c0f34338e7 gem_stress: option to set tiles per buffer
gem_stress -p1 is much more evil than gem_stress -c1, it also manages
to tear appart untiled workloads!

Now duct-taping over it still works (--apply-duct-tape) ... hm.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 13:18:35 +02:00
Daniel Vetter
6daa883fa3 gem_stress: option to continue despite failures
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 00:35:01 +02:00
Daniel Vetter
9649dd7ef0 gem_stress: option to override the number of rounds to complete
gem_stress -c 1

... sometimes takes a while to hit a problem.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 00:58:45 +02:00
Chris Wilson
e0532d4eb0 scripts: Add throttle.py
Parses a trace.dat and works out how long each throttle was and how many
batches retired within that period (and their average duration).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-08 12:16:23 +01:00
Jesse Barnes
e235f93288 testdisplay: automatically enable TEST_PLANES if possible
Just look for the ADDFB2 ioctl and enable the new code if it exists.
2011-06-07 13:32:37 -07:00
Jesse Barnes
8969b839b5 testdisplay: fix error output if test pattern draw fails 2011-06-07 13:29:01 -07:00
Jesse Barnes
b707feb9d5 testdisplay: add tiled buffer test support
Useful for testing tiled vs linear framebuffers.
2011-06-07 13:29:01 -07:00
Jesse Barnes
7230c01421 testdisplay: add overlay plane test option
Enumerate available extra planes and try to use one on each CRTC we enable.
2011-06-07 13:29:01 -07:00