529 Commits

Author SHA1 Message Date
Daniel Vetter
5b8bbc950d testdisplay: compile fix for !DRM_PLANES
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-30 20:45:42 +01:00
Daniel Vetter
5ef806bb5d 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>
2011-10-28 17:40:23 +02:00
Jesse Barnes
1f4c37a6e9 testdisplay: allow overlay plane to be moved & scaled at runtime
For additional testing.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-28 18:06:23 +02:00
Jesse Barnes
234b5c40b1 testdisplay: add stub disable_planes() function
To fix the compile with non-plane libdrms.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-27 17:47:58 -07:00
Jesse Barnes
24e60385fe 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>
2011-10-24 17:18:42 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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