1584 Commits

Author SHA1 Message Date
Daniel Vetter
16c4f52782 tests: add gem_mmap_offset_exhaustion
This also adds a gem_madvise helper to lib/drmtest.c

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-20 14:27:05 +01:00
Daniel Vetter
c4ae3bc412 update .gitingore 2012-03-20 14:26:31 +01:00
Chris Wilson
d364c28089 configure: Add AC_SYS_LARGEFILE for mmap64 support on 64-bit
Without enabling largefile support the prototype for mmap64() is broken
on Linux/x86_64 with the result being a 32-bit integer sign-extended
to fill a 64-bit pointer. Hilarity ensues.
2012-03-14 10:59:51 +00:00
Daniel Vetter
628ad0c91b tests: some more tuning on the tiled partial pwrite/pread test
... 8 pages is just not enough to somewhat reliably get one page that
needs bit17 swizzling.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-29 20:22:45 +01:00
Daniel Vetter
dac239e2b6 tests/gem_tiled_partial_pread/write: fixes
Astonishing how dense I sometimes am ...
- increase the bo size so that we don't have any round-up to next tile
  size areas (which the 2d blit go over, but the 1d pread/pwrite calls
  will notice).
- correctly set tiling bits when copying back to a linear buffer.
- read back through a tiled bo to avoid messing with swizzling.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-29 18:32:02 +01:00
Daniel Vetter
f1d32d541d tests: add tiled partial pwrite/pread test
And indeed, this blows up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-29 16:12:24 +01:00
Jesse Barnes
1e74007b4c testdisplay: remove unnecessary passing of width, height, stride, depth
These are globals, no need to shadow them everywhere.
2012-02-27 12:50:50 -08:00
Jesse Barnes
ea4163395e testdisplay: remove plane test support
This is better done in intel_sprite_on and was broken anyway.
2012-02-27 12:46:11 -08:00
Daniel Vetter
ace4a6e0e9 tests/gem_ringfill: shut up the compiler
Double-include ftl and local variable shadowing. While fixing the
later I've noticed that we mix up width and height in the blt copy
function.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-22 10:50:52 +01:00
Chris Wilson
fa6c2757fe tests/gem_ringfill: Exercise all rings
On SandyBridge, the BLT commands were split from the RENDER commands as
well as the BSD split inherited from Ironlake. So we need to make sure
we do exercise each ring, and in order to do so we also need to make
sure each batch takes longer to execute than it takes for us to
submit it.

v2: Exercise each ring sequentially.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-02-22 10:48:03 +01:00
Eric Anholt
5cf5558682 gem_ringfill: Make this actually test that all the batches executed.
I was looking into some strange behavior in Mesa that looks like
batches maybe being skipped, but this test didn't catch it.
2012-02-22 10:45:53 +01:00
Daniel Vetter
27d1cef2d3 tests: fixup storedw tests
We need to use _INSTRUCTION as the reloc domain because otherwise the
ppgtt pipe_control w/a for snb won't kick in and the test fails.

The storedw tests for blt and bsd are still disabled because the
corresponding patch to flag ppgtt support isn't merged upstream yet.
Without ppgtt these hang my snb here.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-15 17:50:57 +01:00
Daniel Vetter
1d16f7934d test/gem_tiled_pread_pwrite: add progress indicator
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-15 17:43:38 +01:00
Daniel Vetter
6fe3884bc9 add sprite demo from Armin Reese
Also fixed up the copyright header a bit. No comments on the coding
styled used ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-08 16:49:15 +01:00
Yi Sun
3d46ca8c4d tests/testdisplay.c: rewite function dump_connectors and dump_crtcs.
Replace the globe variable drm_fd with local variable passed from parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
[danvet: fixup whitespace]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:38:49 +01:00
Yi Sun
4cceae74e3 tests/testdisplay.c: Fix the black screen issue while force mode.
Replace the 8 globe force mode variables with a struct drmModeInfo variable.
Next step, we could reduce the number of globe veriables, to be convenient to call the functions.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-02-06 20:36:45 +01:00
Daniel Vetter
36a40a5423 gem_partial_pwrite_pread: add progress indicator
Without optimized pread/pwrite this test takes forever.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-31 13:52:59 +01:00
Daniel Vetter
93a65895bb drmtest: add progress indicator
Some test that trash the aperture necessarily need to take forever, so
add a little progress indicator to keep worried minds at peace.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:18:21 +01:00
Daniel Vetter
7492f97cde tests: add gem_cs_prefetch
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 23:03:12 +01:00
Daniel Vetter
fa461203e6 testdisplay: make udev optional
Hopefully this makes Solaris happy.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 11:28:25 +01:00
Daniel Vetter
7f7cafe729 testdisplay: extract hotplug code
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-24 10:50:10 +01:00
Daniel Vetter
8d4d8b00ed tests/gem_tiled_swapping: be more conservative with the swap requirements
Blew up and angered the OOM killer on one of my machines.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-23 17:18:53 +01:00
Daniel Vetter
98129fa2ff tests: add gem_tiled_swapping
Also add a drmtest_exchange_int helper, might come handy at other
places.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 22:28:46 +01:00
Daniel Vetter
fbfe374b28 lib: extract drmtest_permute_array
Lots of tests need to create havoc to LRUs in the kernel or otherwise
need to shuffle things around a bit. So make a small array permutation
function available.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 20:09:54 +01:00
Daniel Vetter
7132d0f977 Revert "tests/gem_tiled_pread_pwrite: actually try to use more than total ram"
This test is actually not really designed to test swap.

This reverts commit 6d755c39d38e9f0e5a991933cc82e015d1ccd272.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 19:14:25 +01:00
Daniel Vetter
6d755c39d3 tests/gem_tiled_pread_pwrite: actually try to use more than total ram
Luckily there's usually enough other stuff around to waste the last
few mb ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 18:04:24 +01:00
Daniel Vetter
08ccec1ec7 tests: make testdisplay non-optional
Not testing modesetting should not be an option.

Also this hopefully prevents testdisplay build-breakage from lingering
on for days like it has in the past.

And we want to eventually test the gem/kms cross-section, i.e.
pageflips.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-19 13:07:25 +01:00
Daniel Vetter
f07e4d1885 lib: extract rendercopy functions from gem_stress
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 21:23:56 +01:00
Daniel Vetter
1357427fd0 gem_stress: s/gem_stress.h/rendercopy.h 2012-01-18 17:53:12 +01:00
Daniel Vetter
f7c2dab5bd gem_stress: move keep_gpu_busy stuff out of render copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:51:48 +01:00
Daniel Vetter
b9fe673f49 gem_stress: move option struct out of header
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:47:33 +01:00
Daniel Vetter
9f20ecc3b3 gem_stress: add width/height arg to rendercpy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:46:00 +01:00
Daniel Vetter
699d30950f gem_stress: move a few things out of gem_stress.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 01:12:52 +01:00
Daniel Vetter
f1de285e7e gem_stress: pass batch as arg to render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:55:49 +01:00
Daniel Vetter
72f74ce355 gem_stress: remove logical_tile_no arg from render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:36:37 +01:00
Daniel Vetter
205510badf gem_stress: add buf->size
Removes a dependency on gem_stress internals from the rendercpy
functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:34:15 +01:00
Daniel Vetter
d75d69d0a9 lib/drmtest: extract mappable aperture trasher infrastructure
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 18:32:11 +01:00
Daniel Vetter
7f944349ef lib/drmtest: extract gem_aperture_size
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 17:14:56 +01:00
Daniel Vetter
d749921e48 tests: update .gitignore 2012-01-15 16:40:32 +01:00
Daniel Vetter
a50eb34398 tests: add ZZ_hangman
Not yet enabled by default because the kernel can't recover from this
on chips where we don't have a gpu reset implemented.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 16:39:49 +01:00
Daniel Vetter
eb64591613 tests: add ZZ_check_dmesg
This way the testsuit automatically fails if we hit a DRM_ERROR
or a WARN/BUG somewhere.

... i.e. this is the Jesse Barnes catcher ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 16:05:43 +01:00
Daniel Vetter
7a54bfa772 tests: add drm_vma_limiter_cached to check libdrm cache mmap pruning
Suggested by Chris Wilson.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 16:56:50 +01:00
Daniel Vetter
cbaa8a389e lib/drmtest: extract helpers for signal interruptions
Also add some hackish stat to check it works.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 15:33:00 +01:00
Daniel Vetter
36d25cc744 tests: add drm_vma_limiter variants that only check gtt/cpu mmaps
Suggested by Chris Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 14:59:47 +01:00
root
553021d974 tests: add drm_vma_limiter
v2: Also check whether a 2nd mmap on the same bo still works.
Suggested by Chris Wilson.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 14:47:09 +01:00
root
e287fe1958 tests/gem_fenced_exec_trash: use drmtest helpers more
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 22:34:52 +01:00
Daniel Vetter
527cad1618 lib/drmtest: extract gem_mmap
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:41:46 +01:00
Daniel Vetter
7a6042e87e lib/drmtest: extract gem_create
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:30:39 +01:00
Daniel Vetter
73d1b88129 testdisplay: rename global fd variable to drm_fd
Shuts up compiler warnings about shadowing in functions.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:20:39 +01:00
Daniel Vetter
db7462e1f5 testdisplay: fixup smaller compiler warnings
const char * issues and redudant getopt stuff

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 18:15:05 +01:00