872 Commits

Author SHA1 Message Date
Mika Kuoppala
a2452d68a0 tests/gem_seqno_wrap: dont sync when crossing half of seqno space
For seqno comparison to work they have to be less than UINT32_MAX/2
apart. So when crossing the half way of seqno space, be careful not
to sync anything as this causes gpu hangs. Do real test with
syncing only when we are about to wrap.

v2: Don't spam if no rendercopy was found, only warn once
2012-12-13 12:52:26 +01:00
Imre Deak
7ab837b214 flip_test: fix link error due to missing -lrt
Needed by clock_gettime(). This isn't a problem if libudev is used,
as that pulles librt with it.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-13 12:52:26 +01:00
Chris Wilson
e0ce231bf3 tests/gem_*_tiled_blits: Use the vma limiter to present address space exhaustion
References: https://bugs.freedesktop.org/show_bug.cgi?id=58113
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-12 14:33:59 +00:00
Chris Wilson
de9621b4f5 tests/gem_tiled_pread_pwrite: Allow the kernel to reap the GTT address space
Otherwise we can not run this test on 32-bit systems.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-12 14:33:59 +00:00
Chris Wilson
b1ee03c540 tests/gem_tiled_swapping: Don't needless crash on 32-bit systems
Only 32-bit of mmap address space, but with PAE we may be trying to
allocate more than 4 GiB of memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-12 14:33:59 +00:00
Maarten Lankhorst
4cd21795d2 tests/prime_nv_pcopy.c: fail if nouveau_pushbuf_kick fails rather than spinning 2012-12-10 13:51:57 +01:00
Daniel Vetter
3084263782 tests: disable gem_exec_bad_domains/conflicting-write-domain
Kernel checks have been eased in

commit c1f093e09c4ceb583b04d11e767bb3201812e4d2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Dec 3 11:49:07 2012 +0000

    drm/i915: Remove check for conflicting relocation write-domains
2012-12-07 23:34:23 +01:00
Chris Wilson
c0dbf04b05 tests: Add a basic test for tiled render copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 20:35:28 +00:00
Chris Wilson
1945e2a7f1 Implement a working gen7 rendercopy
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57825
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 19:52:10 +00:00
Chris Wilson
3ad92902e1 tests: Add basic test for render blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 19:51:54 +00:00
Chris Wilson
50fdf32e46 pci: Search for the first Intel GPU, rather than assume a fixed slot
Everywhere else we search for a match based on an Intel display
device, so if the quick check of the fixed slot fails, fallback to
walking the PCI bus looking for a match.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-12-06 12:18:58 +00:00
Daniel Vetter
51f08301ab tests/gem_exec_nop: implemented correct SKIP reporting
I think I need a testsuite for test writing.
2012-12-05 19:29:11 +01:00
Daniel Vetter
53e184b228 tests/gem_dummy_reloc_loop: some updates
- convert to subtests
- shut up stderr output for successful runs

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-05 10:18:03 +01:00
Daniel Vetter
ad5919617c tests: fixup gem_exec_nop subtests
Note to self: No more pushing after 12 o'clock midnight. Not a good
idea, too embarassing.
2012-12-05 07:54:08 +01:00
Daniel Vetter
d9d9578f3b tests: run no-op batches on all rings
For Ben ...
2012-12-04 17:13:05 +01:00
Mika Kuoppala
796fd58a17 tests: add gem_seqno_wrap
This test uses debugfs entry to set next_seqno close
to a wrapping point and then creates a load with dependant
buffer objects or with specified command to induce the wrap.

v2: Use new get_rendercpy_func as suggested by Daniel Vetter.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-04 23:03:54 +01:00
Daniel Vetter
d0f3a0d77a README: piglit requires results-file for testruns
Noticed by Mika.
2012-12-04 10:42:15 +01:00
Daniel Vetter
175fc656eb tests/Makefile.am: Add a comment about the subtest infrastructure 2012-12-04 10:37:55 +01:00
Daniel Vetter
df545c1968 README: add quick howto for using piglit as testrunner 2012-12-04 10:35:21 +01:00
Daniel Vetter
6daae8bcb6 tests/gem_flink: check flink lifetime rules
flink names may not be destroyed while there's still a userspace
handle around. Test this by
- exporting an flink name from fd2
- open a gem bo from that name in fd
- close fd2, then open a new drm file (so that the original handle
  disappears)
- check whether the same flink name still works
2012-12-01 13:07:45 +01:00
Daniel Vetter
d8df90dc6b tests/gem_exec_bad_domains: add more bad domains
- mulitple write domains
- conflicting write domains
- not-yet-defined gpu domains

Also convert to subtests while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:58:14 +01:00
Daniel Vetter
da6473184c tools/intel_reg_dumper: add some cpt/ppt debug regs
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-01 00:57:36 +01:00
Daniel Vetter
0d7139af58 tests/gem_stress: prevent segfault in getopt parsing
Needs a terminal element in the long option array.
2012-11-29 15:01:09 +01:00
Daniel Vetter
64f669f7a9 lib: extract get_render_copyfunc
Otherwise we won't update all the tests if we add new render
copyfuncs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-29 14:59:57 +01:00
Daniel Vetter
d79414f64a tests: disable gem_non_secure_batch
Seems to cause hangs on some of my old gen2/3 machines, but not all of
them.
2012-11-29 11:27:32 +01:00
Daniel Vetter
df11a6f31d tests/gem_tiled_partial_pwrite_pread: convert to subtest infrastructure 2012-11-28 13:25:12 +01:00
Daniel Vetter
b0066d3659 tests/gem_tiled_partial_pwrite_pread: refactor subtests into functions 2012-11-28 13:22:39 +01:00
Daniel Vetter
129d201337 tests/gem_set_tiling_vs_blt: convert to subtest infrastructure 2012-11-28 13:10:26 +01:00
Daniel Vetter
ca2851f827 tests/gem_ringfill: convert to subtest infrastructure 2012-11-28 13:08:20 +01:00
Daniel Vetter
046b149b18 tests/gem_partial_pwrite_pread: convert to subtest infrastructure 2012-11-28 13:08:07 +01:00
Daniel Vetter
1a55ca753e tests/gem_partial_pwrite_pread: refactor subtests into functions
This was a too big mess.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:47:26 +01:00
Daniel Vetter
af228d4edc tests/gem_mmap_gtt: convert to subtest infrastructure 2012-11-28 12:40:23 +01:00
Daniel Vetter
7160c534f8 tests: re-enable gem_hangcheck_forcewak
Was accidentally disable in ab3f4bdafe60dede32a48674ef9920df090bf3a7

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:38:00 +01:00
Daniel Vetter
a2778575d5 tests/gem_gtt_concurrent_blit: convert to subtest infrastructure
Same treatment as for gem_cpu_concurrent_blit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:35:03 +01:00
Daniel Vetter
2a9e128b18 tests/gem_flink: convert to subtest infrastructure 2012-11-28 12:17:40 +01:00
Daniel Vetter
9d65d484f6 tests/gem_cs_tlb: convert to subtests
Again required a bit of shuffling to avoid expensive setup and some
logic to properly handling 'skip' when only running a subtest.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:09:58 +01:00
Daniel Vetter
4f6ab180a1 tests/gem_cpu_concurrent_blt: convert to subtest infrastructure
Small changes to avoid expensive setup just to print out the subtest
list, and setting up the source buffers such that "early-read" works
without having run "overwrite-soure" right beforehand.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 12:00:33 +01:00
Daniel Vetter
792a05a0a1 tests/gem_cacheing: convert to subtest infrastructure 2012-11-28 11:57:58 +01:00
Daniel Vetter
3cca0d8c6d tests/gem_basic: convert to subtest infrastructure 2012-11-28 11:57:58 +01:00
Daniel Vetter
c3d5c1292b tests/flip_test: use subtest infrastructure
To make the testnames easier to handle in scripts, replace all
spaces with dashes.

The important part is to not print anything to stdout when enumerating
subtests, so protect the timestamp test with the right check.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:57:58 +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
Daniel Vetter
021909e10d tests: dont polute stderr if the test succeeds/skips
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Daniel Vetter
4fae0c65c5 tests: remove ZZ_check_dmesg from runner
This is getting in the way of piglit integration. If we want this
functionality again, we should integrate it into the IGT piglit runner
as an option.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:37 +01:00
Daniel Vetter
c79c56cf8c tests: infrastructure for piglit runner
Piglit needs a way to grab the latest list of tests to run, so add new
make targets to dump those. Note that for future extendability we'll
dump 2 different lists, one for single-testcase tests and one for
testcases with enumerable subcases. Some support code for the later
will follow in subsequent patches.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 11:08:31 +01:00
Damien Lespiau
b11887741c testdisplay: Use the fb stride when painting the color key
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55901

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-28 00:16:54 +01:00
Daniel Vetter
e5315f9dad tests: add gem_non_secure_batch 2012-11-25 13:55:55 +01:00
Imre Deak
314953117f flip_test: switch to using monotonic timestamps (v2)
Since monotonic timestamps are now the preferred time format, change
timestamps checks to compare against monotonic instead of real time.
Also add two tests for DRM's compatibility mode where it returns real
timestamps.

v2: drop the tests for the compatibilty mode (Daniel)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 21:20:30 +01:00
Imre Deak
b7067d6c10 flip_test: use monotonic time to measure the test duration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 14:51:28 +01:00
Imre Deak
8a2593bd3c flip_test: skip check for last_received_ts for the first event
The old way worked too, but just skipping the test for the first event
is more logical/simpler thing to do.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-11-22 14:51:26 +01:00
Imre Deak
b28caa0ac0 flip_test: add wf-vblank test for expired sequence
In v2:
- Wait for the seq that just completed (current_seq) not last_seq - 1.
- Do an equality check for ts and seq instead of >=. The previous
  issue didn't let us do this before.
- Simplify the condition when we do an "expired sequence" check by
  only using the last flip event as a reference.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-23 12:45:06 +02:00