3208 Commits

Author SHA1 Message Date
Daniel Vetter
1c6511f7fb 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>
2011-10-16 21:14:03 +02:00
Daniel Vetter
2e9e27ce6b 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>
2011-10-15 13:46:19 +02:00
Daniel Vetter
b75451838a tests/gem_*_blits: reduce buffer count to not trash swap
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-15 13:23:03 +02:00
Eugeni Dodonov
62c542fd4e 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>
2011-10-14 16:01:52 -03:00
Adam Jackson
eaaddc794b 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>
2011-10-11 18:25:26 -04: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
Jesse Barnes
503cfa2707 Treat PPT like CPT as we do in the kernel
Set the pch type to CPT if we detect a PPT as well.
2011-10-10 11:24:42 -07:00
Daniel Vetter
af6a25c187 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>
2011-09-28 10:05:56 +02:00
Daniel Vetter
a2dfbbf3e7 tools/decode: add missing shift to MI_SEM_MBOX decoder
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-28 10:02:57 +02:00
Paulo Zanoni
17ceccedbf 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>
2011-09-16 22:21:52 +02:00
Paulo Zanoni
a167425b39 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>
2011-09-15 19:39:44 +02:00
Paulo Zanoni
ca2800f1d4 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>
2011-09-15 19:39:25 +02:00
Paulo Zanoni
3ba12bbb2f 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>
2011-09-15 19:38:29 +02:00
Paulo Zanoni
7ead7ba3e6 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>
2011-09-15 19:38:21 +02:00
Paulo Zanoni
9fe1148c4b 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>
2011-09-15 19:38:18 +02:00
Paulo Zanoni
e450cf6d8a Add missing files to .gitignore
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-15 19:38:14 +02:00
Paulo Zanoni
19fef544eb 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>
2011-09-15 19:38:04 +02:00
Daniel Vetter
733a1d9f34 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>
2011-09-15 18:47:21 +02:00
Daniel Vetter
ba2255a7e4 tests: build all tests by default
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-14 14:59:23 +02:00
Daniel Vetter
d6ac159ba1 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>
2011-09-14 14:59:23 +02:00
Daniel Vetter
2c380c2eac 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>
2011-09-14 11:06:03 +02:00
Daniel Vetter
bbe635f0dc 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>
2011-09-13 21:05:10 +02:00
Ben Widawsky
a5abe17746 intel: we don't do distcheck for the debugger 2011-09-13 08:55:01 -07:00
Daniel Vetter
f91e2c2b7e intel_gpu_dump: really kill it
This is getting a bit hilarious ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-13 17:20:12 +02:00
Daniel Vetter
c7a98ae251 intel_gpu_dump: also kill manpage
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-13 12:05:58 +02:00
Daniel Vetter
8d9792ce23 tools: remove intel_gpu_dump
Superseded by the kernel's i915_error_state dumping facility.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-13 11:43:06 +02:00
Daniel Vetter
e855dc2223 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>
2011-09-13 11:41:42 +02:00
Daniel Vetter
19d69955d2 tests: exit(77) to properly mark tests as SKIP
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-13 11:05:13 +02:00
Daniel Vetter
21ec8c78b3 tests: mark gen3-only tests as such
... instead of hanging the gpu.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-12 20:56:13 +02:00
Daniel Vetter
b8245e18fe 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>
2011-09-12 20:45:49 +02:00
Daniel Vetter
fbf8950f6e tests: check pipe_control coherency
v2: proper support for gen6+

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-12 20:40:10 +02:00
Daniel Vetter
bf9f149a6d tools: add intel_gen
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-12 20:39:45 +02:00
Daniel Vetter
61b9806f4e 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>
2011-09-12 09:39:16 +02:00
Daniel Vetter
32f49c7c0d 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>
2011-09-09 22:57:16 +02:00
Daniel Vetter
d1aae145a7 tests/gem_storedw: disable on pre-gen6
Doesn't work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 22:57:16 +02:00
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