36 Commits

Author SHA1 Message Date
Imre Deak
3a2aed1f30 lib: move connector_type_str and co to drmtest
These are used by multiple test cases, so make them shared.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06 01:43:50 +03:00
Imre Deak
bce7d8a061 lib: export the exit handler interface
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22 18:18:28 +02:00
Imre Deak
cf26435be8 lib: add helper to set VT graphics mode
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 21:00:42 +02:00
Zhong Li
8ddf84d129 i-g-t: check kernel enable rings or not
1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-03 17:39:14 -07:00
Chris Wilson
2facc1368d Check for vebox support before testing
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
2013-04-26 08:30:52 +01:00
Damien Lespiau
bb33d08845 lib: Add a way to specify values for "quick" runs
In some environments, we don't really want to loop 100000 times or
allocate 152352621 buffers because it makes the tests too long to run.

This adds a way to specify "quick" values to reduce the time taken by
certain tests.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-13 18:09:11 +01:00
Daniel Vetter
0af2b184ad lib: extract kmstest_get_pipe_from_crtc_id 2012-12-17 15:30:54 +01:00
Daniel Vetter
9fc7e1386a lib/drmtest: subtest infrastructure
To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.

The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:57:58 +01:00
Imre Deak
21393431f1 drmtest: add function to remove an DRM FB
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-16 16:51:56 +02:00
Daniel Vetter
df7edaab90 lib: helper to convert gem_hanlde to drm_intel_bo 2012-10-02 10:32:10 +02:00
Chris Wilson
51baabb562 Add bare-metal interface to adjust cacheing (i.e. snoop status) of a bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27 09:39:45 +01:00
Daniel Vetter
6bc22e3dfd tests: add basic re-importing prime test
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-07-23 09:52:10 +02:00
Chris Wilson
77586dcdf7 test/gem_gtt_speed: Add a baseline test for the performance of a CPU mmap
When looking at the pwrite/pread/wc performance, it is useful to judge
that against the performance of an ordinary CPU mmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-04 17:50:51 +01:00
Daniel Vetter
17787f30c6 lib: extract kmstest_dump_mode 2012-05-22 16:15:15 +02:00
Daniel Vetter
662d732199 lib: extract kmstest_create_fb
We should get more kms tests soon, and not needing to copy-paste a
nice test pattern should be useful.

That establishes a firm depency of i-g-t on cairo over everything, but
I don't care so much about that.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 15:56:29 +02:00
Daniel Vetter
cf72da57dc tests: add gem_unfence_active_buffers
Unfortunately this requires slab poisoning to catch anything :(

Also add a new helper to drmtest to get the available fence count.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-22 12:35:23 +02:00
Ben Widawsky
f841f4028c tests: rc6 residency test
This is meant to test the sysfs entry for showing rc6 residency in
milliseconds. Remember, sysfs is a permanent interface.

v2: use new get_card interface to try "all" devices
check rc6p and rc6pp in addition to rc6

v3: rename rc6_residency.c to sysfs_rc6_residency.c
print better error messages
skip test if rc6 isn't enabled

v4: update to new sysfs names

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2012-04-10 21:11:13 -07:00
Chris Wilson
b7bd1837cc Make the assertions guarding syscalls (drmIoctl in particular) verbose
Currently all we see is gem_read: ret == 0 failed, where it would help
to see the errno and/or the ret.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-03-29 12:50:07 +01:00
Daniel Vetter
afbdc7af8d tests: adapt storedw tests to ppgtt
MI_MEM_VIRTUAL actually means use global gtt now, not setting the bit
means use ppgtt. On previous gens, not setting the bits ment 'use
physical memory'. So what, the usual confusion.

Note that for some odd reasong this is broken on gen6, but only on the
bsd ring. Unexpected.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-22 14:00:22 +01:00
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
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
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
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
7b14b093d4 lib/drmtest: add gem_mappable_aperture_size
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 17:40:41 +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
9f87660304 lib/drmtest: add gpu quiescent helper
Some tests are higly timing dependent and others carelessly leave
active buffers behind. So add a helper to quiescent the gpu and call
it unconditionally when opening an fd in a vain attempt to make all
this race-condition hitting more scientifically sound.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 17:19:53 +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
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
673e6b220a lib/drmtest: extract gem_set_domain and gem_sync
gem_sync just does a gtt sync by using set_domain(GTT, GTT).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 16:05:34 +01:00
Daniel Vetter
bd5cf9a07d lib/drmtest: extract gem_read
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:37:53 +01:00
Daniel Vetter
319638ba6d lib/drmtest: extract gem_write
Astonishing how many different function signatures are possible for
something that simple.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:31:11 +01:00
Daniel Vetter
5dd17d3f4b lib/drmtest: extract gem_close
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 15:07:19 +01:00
Daniel Vetter
aa67b22e42 lib/drmtest: extract gem_set_tiling
Way too much copy-pasting going on here.

Also fix a compiler warnings in gem_stress while fixup things up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 14:59:58 +01:00
Eric Anholt
8c64183a46 Initial import of intel-graphics-tools with some microbenchmarks. 2009-03-26 17:15:11 -07:00