platform/upstream/intel-gpu-tools.git
12 years agotests: add test to read all debugfs files
Daniel Vetter [Sun, 30 Oct 2011 19:51:03 +0000 (20:51 +0100)]
tests: add test to read all debugfs files

Catches a bunch of forcewake warnings on snb+

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: compile fix for !DRM_PLANES
Daniel Vetter [Sun, 30 Oct 2011 19:45:42 +0000 (20:45 +0100)]
testdisplay: compile fix for !DRM_PLANES

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_unref_active_buffers
Daniel Vetter [Fri, 28 Oct 2011 15:39:14 +0000 (17:39 +0200)]
tests: add gem_unref_active_buffers

The crucial trick to reproduce the bug is that we need to have
a decent pile of active bos to retire. Because we unref the bo
after having it moved off the active list, our recursion depth
in fdo bug #42180 is limited by the number of active objects that
can retire at the same time.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: allow overlay plane to be moved & scaled at runtime
Jesse Barnes [Fri, 28 Oct 2011 03:25:53 +0000 (05:25 +0200)]
testdisplay: allow overlay plane to be moved & scaled at runtime

For additional testing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12 years agointel_reg_dumper: handle 3 pipe configs when dumping HDMI config
Jesse Barnes [Fri, 28 Oct 2011 15:53:48 +0000 (08:53 -0700)]
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>
12 years agotestdisplay: add stub disable_planes() function
Jesse Barnes [Fri, 28 Oct 2011 00:47:58 +0000 (17:47 -0700)]
testdisplay: add stub disable_planes() function

To fix the compile with non-plane libdrms.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12 years agotools/decode: decode XY_SCANLINES_BLT
Daniel Vetter [Tue, 25 Oct 2011 10:24:17 +0000 (12:24 +0200)]
tools/decode: decode XY_SCANLINES_BLT

12 years agotools/decode: decode XY_SETUP_* cmds
Daniel Vetter [Tue, 25 Oct 2011 10:15:27 +0000 (12:15 +0200)]
tools/decode: decode XY_SETUP_* cmds

And extract decode code for br00 and br01.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: add sprite scaling and location support
Jesse Barnes [Mon, 24 Oct 2011 15:15:34 +0000 (17:15 +0200)]
testdisplay: add sprite scaling and location support

Allow testdisplay to locate the sprite on the screen and potentially
scale it using different crtc width/height vs the source width/height
(determined by the resolution on the target pipe).

Also fix exit, making sure we properly disable all the planes.

Signed-off-by: Jesse Barnes <jbarnes@virtuougseek.org>
12 years agotools/intel_error_decode: decode gen4+ fences
Daniel Vetter [Fri, 21 Oct 2011 17:06:08 +0000 (19:06 +0200)]
tools/intel_error_decode: decode gen4+ fences

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/decode: properly decode gen6+ PIPE_CONTROL flags
Daniel Vetter [Fri, 21 Oct 2011 08:09:14 +0000 (10:09 +0200)]
tools/decode: properly decode gen6+ PIPE_CONTROL flags

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotop: Avoid FPE by removing meaningless metric
Chris Wilson [Tue, 18 Oct 2011 13:05:54 +0000 (14:05 +0100)]
top: Avoid FPE by removing meaningless metric

12 years agointel_reg_checker: New tool to accumulate checks for HW workarounds.
Eric Anholt [Fri, 23 Sep 2011 21:47:44 +0000 (14:47 -0700)]
intel_reg_checker: New tool to accumulate checks for HW workarounds.

The goal of this tool is to be usable as a test for whether something
(suspend/resume, GPU reset, bugs, whatever) may have lost various
required hardware setup specified in the docs.

Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agointel/decode: print out chipset gen
Daniel Vetter [Tue, 18 Oct 2011 14:30:56 +0000 (16:30 +0200)]
intel/decode: print out chipset gen

... instead of i965+ for almost everything that Intel is still selling.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/decode: don't move around the display register section
Daniel Vetter [Tue, 18 Oct 2011 13:54:31 +0000 (15:54 +0200)]
tools/decode: don't move around the display register section

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/decode: don't forget to print the name of the last ring
Daniel Vetter [Tue, 18 Oct 2011 13:49:41 +0000 (15:49 +0200)]
tools/decode: don't forget to print the name of the last ring

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAllow intel_dump_decode to read data from stdin.
Eugeni Dodonov [Mon, 17 Oct 2011 19:48:18 +0000 (17:48 -0200)]
Allow intel_dump_decode to read data from stdin.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agotools/intel_dump_decode: make devid parsing more useful
Daniel Vetter [Mon, 17 Oct 2011 17:41:42 +0000 (19:41 +0200)]
tools/intel_dump_decode: make devid parsing more useful

We use hex for these!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/decode: retain the ring name
Daniel Vetter [Tue, 11 Oct 2011 11:14:02 +0000 (13:14 +0200)]
tools/decode: retain the ring name

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add gem_hangcheck_forcewake
Daniel Vetter [Sun, 16 Oct 2011 19:13:34 +0000 (21:13 +0200)]
tests: add gem_hangcheck_forcewake

Provokes the forcewake warning when the hangcheck runs and no
one waits for the gpu (and hence holds the dev->struct_mutex).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_fence_trash: some retuning
Daniel Vetter [Sat, 15 Oct 2011 11:46:19 +0000 (13:46 +0200)]
tests/gem_fence_trash: some retuning

We actually want to test lru behaviour, so do a bit of work with
the fence before yielding to the next thread (we use twice as many
fences as there are, so yielding always is pretty bad, no matter how
clever our fence stealing).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_*_blits: reduce buffer count to not trash swap
Daniel Vetter [Sat, 15 Oct 2011 11:09:36 +0000 (13:09 +0200)]
tests/gem_*_blits: reduce buffer count to not trash swap

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAllow to output statistics to stdout.
Eugeni Dodonov [Fri, 14 Oct 2011 18:26:13 +0000 (15:26 -0300)]
Allow to output statistics to stdout.

This allows intel_gpu_top to run both in statistics-collecting mode
(collecting the per-ring statistics in gnuplot-friendly format) and
ncurses top-like mode at the same time.

It also allows to output the statistics directly to stdout, by using "-o
-", so the results can be parsed directly via a popen() parsing.

If you are using intel_gpu_top as previously (without any command-line
arguments), it should change nothing for you. If you were using its
logging facilities (e.g., the '-o file'), note that the logging will keep
running, but the detailed top-like interface will be on the screen at the
same time.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
12 years agobios_reader: Allow forcing the device ID with DEVICE=0xNNNN
Adam Jackson [Tue, 11 Oct 2011 22:25:26 +0000 (18:25 -0400)]
bios_reader: Allow forcing the device ID with DEVICE=0xNNNN

As a pleasant side effect you can now feed it an opregion dump and it'll
decode without crashing.

Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agointel_reg_dumper: use none instead of NULL if no port is assigned to TRANS_DP
Jesse Barnes [Tue, 11 Oct 2011 18:37:25 +0000 (11:37 -0700)]
intel_reg_dumper: use none instead of NULL if no port is assigned to TRANS_DP

Makes the output a little more readable.

12 years agoTreat PPT like CPT as we do in the kernel
Jesse Barnes [Mon, 10 Oct 2011 18:24:42 +0000 (11:24 -0700)]
Treat PPT like CPT as we do in the kernel

Set the pch type to CPT if we detect a PPT as well.

12 years agotests: disable storedw tests on !render
Daniel Vetter [Wed, 28 Sep 2011 08:05:56 +0000 (10:05 +0200)]
tests: disable storedw tests on !render

According to docs, this should work with ppgtt and just convert to
noops otherwise. In reality, it hangs the machine.

So just disable these for the moment.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/decode: add missing shift to MI_SEM_MBOX decoder
Daniel Vetter [Wed, 28 Sep 2011 08:02:57 +0000 (10:02 +0200)]
tools/decode: add missing shift to MI_SEM_MBOX decoder

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: return 0 when successful
Paulo Zanoni [Fri, 16 Sep 2011 21:06:27 +0000 (18:06 -0300)]
testdisplay: return 0 when successful

We use the "ret" variable to check function return values, and these
values are not necessarily 0 on the successful cases, so we need to
reset "ret" after we finish using it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogetstats: remove useless assertion
Paulo Zanoni [Thu, 15 Sep 2011 18:18:40 +0000 (15:18 -0300)]
getstats: remove useless assertion

getstats.c:48:2: warning: comparison of unsigned expression >= 0 is
always true

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm_open_any: explain why we are abort()ing
Paulo Zanoni [Thu, 15 Sep 2011 18:17:46 +0000 (15:17 -0300)]
drm_open_any: explain why we are abort()ing

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[danvet: pimped error msg]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: remove wrong return statement
Paulo Zanoni [Thu, 15 Sep 2011 18:16:33 +0000 (15:16 -0300)]
testdisplay: remove wrong return statement

It seems that the kernel patches required by the TEST_PLANES feature are
still not upstream, so I didn't test this patch.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: don't enter the main loop if dump_info or test_all_modes
Paulo Zanoni [Thu, 15 Sep 2011 18:14:18 +0000 (15:14 -0300)]
testdisplay: don't enter the main loop if dump_info or test_all_modes

If calls inside update_display fail, the function returns and we don't
quit the program if dump_info or test_all_modes. So we enter the main
loop and keep waiting for user input, even on cases where we are not
supposed to require user input. To fix this, we move the check to
outside the update_display function.  As a side effect, we also do
cleanup instead of just exit(0) and we return 1 in case update_display
failed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: test all modes if no option is provided
Paulo Zanoni [Thu, 15 Sep 2011 18:13:41 +0000 (15:13 -0300)]
testdisplay: test all modes if no option is provided

Previously, when called without any arguments, the application required
user input to finish.  However, testdisplay is ran by "make check", and
it is not a good idea to run a program that requires user input in "make
check". So we change the default behavior to something that doesn't
require user input. You can still access the previous behavior using the
"-m" argument.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoAdd missing files to .gitignore
Paulo Zanoni [Thu, 15 Sep 2011 18:12:48 +0000 (15:12 -0300)]
Add missing files to .gitignore

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotestdisplay: fix compiler warnings
Paulo Zanoni [Thu, 15 Sep 2011 18:10:52 +0000 (15:10 -0300)]
testdisplay: fix compiler warnings

testdisplay.c:117:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:125:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:145:1: warning: comparison between signed and unsigned
integer expressions
testdisplay.c:1060:16: warning: comparison between signed and unsigned
integer expressions

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_mmap_gtt: also test gtt pwrite paths
Daniel Vetter [Thu, 15 Sep 2011 16:47:21 +0000 (18:47 +0200)]
tests/gem_mmap_gtt: also test gtt pwrite paths

This needs a properly pre-faulted dst bo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: build all tests by default
Daniel Vetter [Wed, 14 Sep 2011 12:58:55 +0000 (14:58 +0200)]
tests: build all tests by default

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: separate testcases in gem_bad_length
Daniel Vetter [Wed, 14 Sep 2011 12:48:45 +0000 (14:48 +0200)]
tests: separate testcases in gem_bad_length

Creating a zero-length bo should fail, so check that. Still run
the minimal batchbuffer, but without the zero-length reloc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: disable gem_bad_blit
Daniel Vetter [Wed, 14 Sep 2011 09:06:03 +0000 (11:06 +0200)]
tests: disable gem_bad_blit

Hangs gen3 and simply writes garbage into the unmappable part of
gtt on gen4+, which might cause issues later on.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_bad_length: dont throw garbage at the gpu
Daniel Vetter [Tue, 13 Sep 2011 18:57:04 +0000 (20:57 +0200)]
tests/gem_bad_length: dont throw garbage at the gpu

It doesn't like it. Really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel: we don't do distcheck for the debugger
Ben Widawsky [Tue, 13 Sep 2011 15:54:33 +0000 (08:54 -0700)]
intel: we don't do distcheck for the debugger

12 years agointel_gpu_dump: really kill it
Daniel Vetter [Tue, 13 Sep 2011 15:20:12 +0000 (17:20 +0200)]
intel_gpu_dump: really kill it

This is getting a bit hilarious ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agointel_gpu_dump: also kill manpage
Daniel Vetter [Tue, 13 Sep 2011 10:05:58 +0000 (12:05 +0200)]
intel_gpu_dump: also kill manpage

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools: remove intel_gpu_dump
Daniel Vetter [Tue, 13 Sep 2011 09:43:06 +0000 (11:43 +0200)]
tools: remove intel_gpu_dump

Superseded by the kernel's i915_error_state dumping facility.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools: beef up intel_dump_decode
Daniel Vetter [Tue, 13 Sep 2011 09:41:42 +0000 (11:41 +0200)]
tools: beef up intel_dump_decode

- now also handles ascii dumps like i915_ringbuffer_data
- getoptified
- totally lazy binary detector

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: exit(77) to properly mark tests as SKIP
Daniel Vetter [Tue, 13 Sep 2011 09:05:13 +0000 (11:05 +0200)]
tests: exit(77) to properly mark tests as SKIP

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: mark gen3-only tests as such
Daniel Vetter [Mon, 12 Sep 2011 18:56:13 +0000 (20:56 +0200)]
tests: mark gen3-only tests as such

... instead of hanging the gpu.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: add basic test for missed irqs
Daniel Vetter [Mon, 12 Sep 2011 18:45:06 +0000 (20:45 +0200)]
tests: add basic test for missed irqs

Didn't catch any known bug, but can't hurt.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: check pipe_control coherency
Daniel Vetter [Wed, 7 Sep 2011 07:31:00 +0000 (09:31 +0200)]
tests: check pipe_control coherency

v2: proper support for gen6+

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools: add intel_gen
Daniel Vetter [Mon, 12 Sep 2011 18:33:58 +0000 (20:33 +0200)]
tools: add intel_gen

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: basic ring<->cpu and ring<->ring tests
Daniel Vetter [Fri, 9 Sep 2011 18:44:27 +0000 (20:44 +0200)]
tests: basic ring<->cpu and ring<->ring tests

Using a dummy reloc that doesn't matter to trick the kernel into
synchroizing the rings.

v2: properly apply MI_NOOP workaround to MI_FLUSH_DW and
switch to MI_COND_BATCH_BUFFER_END as a dummy command on the
render ring to avoid PIPE_CONTROL errata.

v3: somebody clever decided that in C, you cound from 1,
i.e. I915_EXEC_RENDER == 1. It works now ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests: split up gem_storedw_loop into ring specific variations
Daniel Vetter [Thu, 8 Sep 2011 08:50:37 +0000 (10:50 +0200)]
tests: split up gem_storedw_loop into ring specific variations

Also start to shortly explain testcases with an easily-greppable
header like this:

/*
 * Testcase:
 *
 * [Possible further explanation.]
 *
 */

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotests/gem_storedw: disable on pre-gen6
Daniel Vetter [Wed, 7 Sep 2011 08:18:06 +0000 (10:18 +0200)]
tests/gem_storedw: disable on pre-gen6

Doesn't work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agolib/batch: hackish interface to run batches on specific rings
Daniel Vetter [Wed, 7 Sep 2011 07:20:36 +0000 (09:20 +0200)]
lib/batch: hackish interface to run batches on specific rings

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotest/gem_storedw_*: tune some more
Daniel Vetter [Tue, 6 Sep 2011 19:16:21 +0000 (21:16 +0200)]
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>
12 years agotools: decode some more MI_ ops
Daniel Vetter [Fri, 9 Sep 2011 15:22:28 +0000 (17:22 +0200)]
tools: decode some more MI_ ops

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools: decode MI_SEMAPHORE_MBOX
Daniel Vetter [Fri, 9 Sep 2011 08:10:07 +0000 (10:10 +0200)]
tools: decode MI_SEMAPHORE_MBOX

Juggle the length check up to avoid duplication.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agotools/intel_gpu_dump: add hackish --devid parsing
Daniel Vetter [Tue, 6 Sep 2011 18:54:16 +0000 (20:54 +0200)]
tools/intel_gpu_dump: add hackish --devid parsing

For bugreports and whatnotelse.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agogem_vmap_blits: fix compilation if I915_PARAM_HAS_VMAP is not defined
Paulo Zanoni [Wed, 24 Aug 2011 17:57:31 +0000 (14:57 -0300)]
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>
12 years agointel_gpu_top: access hardware before running profiling command
Eugeni Dodonov [Mon, 5 Sep 2011 23:04:17 +0000 (20:04 -0300)]
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>
12 years agointel_gpu_tools: describe -e option in usage screen
Eugeni Dodonov [Mon, 5 Sep 2011 22:59:40 +0000 (19:59 -0300)]
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>
12 years agointel_gpu_top: adopt to kernel coding style
Eugeni Dodonov [Mon, 5 Sep 2011 22:50:52 +0000 (19:50 -0300)]
intel_gpu_top: adopt to kernel coding style

This patch fixes adopts the code to the kernel coding_style.

12 years agointel_gpu_top: support profiling user-specified commands
Eugeni Dodonov [Mon, 5 Sep 2011 22:41:24 +0000 (19:41 -0300)]
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>
12 years agointel_gpu_top: support non-interactive mode
Eugeni Dodonov [Mon, 5 Sep 2011 22:39:58 +0000 (19:39 -0300)]
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>
12 years agoThis patch initializes the last_stats[] for registers prior to starting
Eugeni Dodonov [Mon, 5 Sep 2011 22:35:44 +0000 (19:35 -0300)]
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>
12 years agoRevert "intel_gpu_top: initialize monitoring statistics at startup"
Eugeni Dodonov [Mon, 5 Sep 2011 22:33:40 +0000 (19:33 -0300)]
Revert "intel_gpu_top: initialize monitoring statistics at startup"

This reverts commit 431fe7803d37f344275fdaceb57c1fbaeee8541c.

Will be replaced with more fine-grained commits.

12 years agointel_gpu_top: initialize monitoring statistics at startup
Eugeni Dodonov [Mon, 5 Sep 2011 19:33:04 +0000 (16:33 -0300)]
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>
12 years agointel_gpu_tool: initial support for non-screen output
Eugeni Dodonov [Mon, 5 Sep 2011 19:29:39 +0000 (16:29 -0300)]
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>
12 years agointel_gpu_top: suport command line parameters and variable samples per
Eugeni Dodonov [Mon, 5 Sep 2011 19:23:11 +0000 (16:23 -0300)]
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>
12 years agointel_gpu_top: account for time spent in syscalls
Eugeni Dodonov [Mon, 5 Sep 2011 18:31:17 +0000 (15:31 -0300)]
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>
12 years agotests: add store dword tests
Jesse Barnes [Fri, 12 Aug 2011 19:51:34 +0000 (12:51 -0700)]
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>
12 years agotestdisplay: for tiled mode test, the height should be aligned
Hai Lan [Fri, 5 Aug 2011 04:47:25 +0000 (00:47 -0400)]
testdisplay: for tiled mode test, the height should be aligned

Signed-off-by: Hai Lan <hai.lan@intel.com>
12 years agoAdd missing copyright info to intel_decode.c
Eric Anholt [Mon, 1 Aug 2011 17:39:51 +0000 (10:39 -0700)]
Add missing copyright info to intel_decode.c

12 years agotools: readme addition for shader debugging
Ben Widawsky [Thu, 28 Jul 2011 21:58:24 +0000 (14:58 -0700)]
tools: readme addition for shader debugging

12 years agotools/range handing: forgot the register map file :(
Ben Widawsky [Thu, 28 Jul 2011 22:07:28 +0000 (15:07 -0700)]
tools/range handing: forgot the register map file :(

12 years agointel-gpu-tools/debugging: shader debugger
Ben Widawsky [Fri, 24 Jun 2011 18:42:03 +0000 (11:42 -0700)]
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

12 years agointel-gpu-tools/debugging: add important debug regs
Ben Widawsky [Sun, 17 Jul 2011 19:43:12 +0000 (12:43 -0700)]
intel-gpu-tools/debugging: add important debug regs

Cc: Chris Wilson <chris@chris-wilson.co.uk>
12 years agointel-gpu-tools/forcewaked: sample forcewake app
Ben Widawsky [Tue, 14 Jun 2011 18:00:30 +0000 (11:00 -0700)]
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>
12 years agointel-gpu-tools/range handling: register range handling
Ben Widawsky [Thu, 28 Jul 2011 20:42:45 +0000 (13:42 -0700)]
intel-gpu-tools/range handling: register range handling

Hooks to allow safe accesses from userspace. Can revert to old behavior
by using unsafe access.

12 years agoforcewake: Add mmio code to do proper forcewake stuff for gen6
Ben Widawsky [Thu, 28 Jul 2011 20:40:19 +0000 (13:40 -0700)]
forcewake: Add mmio code to do proper forcewake stuff for gen6

13 years agoAdd intel_backlight
Chris Wilson [Wed, 20 Jul 2011 19:40:13 +0000 (20:40 +0100)]
Add intel_backlight

A trivial tool to adjust the backlight registers (gen5+ only atm).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel_decode: Handle a few gen7 blocks
Chris Wilson [Wed, 20 Jul 2011 19:39:56 +0000 (20:39 +0100)]
intel_decode: Handle a few gen7 blocks

13 years agogem_stress: ducttaping mandatory
Daniel Vetter [Sun, 17 Jul 2011 21:33:27 +0000 (23:33 +0200)]
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>
13 years agotestdisplay: Test the first mode if there is no preferred mode.
Hai Lan [Tue, 31 May 2011 21:13:30 +0000 (17:13 -0400)]
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>
13 years agotests/gem_vmap_blits: Fix typo
Chris Wilson [Fri, 8 Jul 2011 14:01:39 +0000 (15:01 +0100)]
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>
13 years agointel_reg_dumper: Slightly tidy the reporting of pipe configs
Chris Wilson [Fri, 8 Jul 2011 13:55:36 +0000 (14:55 +0100)]
intel_reg_dumper: Slightly tidy the reporting of pipe configs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoAdd a test case for coherency of vmaps
Chris Wilson [Fri, 8 Jul 2011 13:54:32 +0000 (14:54 +0100)]
Add a test case for coherency of vmaps

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agogem_stress: Assert we have no pending ops when using the CPU
Chris Wilson [Wed, 25 May 2011 13:49:40 +0000 (14:49 +0100)]
gem_stress: Assert we have no pending ops when using the CPU

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agogem_gtt_speed: Add option for variable buffer size
Chris Wilson [Wed, 25 May 2011 13:40:38 +0000 (14:40 +0100)]
gem_gtt_speed: Add option for variable buffer size

13 years agogem_stress: Add an option to test handling of signals
Chris Wilson [Sat, 2 Jul 2011 07:59:32 +0000 (08:59 +0100)]
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>
13 years agotests: Add an exercise for zero-length buffers
Chris Wilson [Thu, 23 Jun 2011 13:04:35 +0000 (14:04 +0100)]
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>
13 years agotests: Add a simple exercise of GTT mmaps
Chris Wilson [Mon, 20 Jun 2011 12:53:12 +0000 (13:53 +0100)]
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>
13 years agogem_stress: some stats about incoherencies
Daniel Vetter [Mon, 13 Jun 2011 20:02:52 +0000 (22:02 +0200)]
gem_stress: some stats about incoherencies

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogem_stress: option to disable render copyfunc check
Daniel Vetter [Mon, 13 Jun 2011 18:14:53 +0000 (20:14 +0200)]
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>
13 years agogem_stress: option for tile_size
Daniel Vetter [Mon, 13 Jun 2011 18:09:38 +0000 (20:09 +0200)]
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>
13 years agogem_stress: option to set tiles per buffer
Daniel Vetter [Mon, 13 Jun 2011 11:18:35 +0000 (13:18 +0200)]
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>
13 years agogem_stress: option to continue despite failures
Daniel Vetter [Sun, 12 Jun 2011 22:22:01 +0000 (00:22 +0200)]
gem_stress: option to continue despite failures

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogem_stress: option to override the number of rounds to complete
Daniel Vetter [Tue, 7 Jun 2011 20:30:03 +0000 (22:30 +0200)]
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>
13 years agoscripts: Add throttle.py
Chris Wilson [Wed, 8 Jun 2011 11:13:46 +0000 (12:13 +0100)]
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>