529 Commits

Author SHA1 Message Date
Daniel Vetter
c26b5ee72f tests: fixup type in module_reload
Oops, I've frobbed this to test the check but committed the wrong
version.
2012-05-25 11:29:28 +02:00
root
3985d9b976 tests: add some help to module_reload
... so that it's easier to get the kernel configuration right.
2012-05-25 11:28:38 +02:00
root
a628d56470 tests: add module reload testcase
We've broken this way too often in the past.
2012-05-25 11:02:09 +02:00
Daniel Vetter
2448a75ff6 tests/hangman: fix when run with absolute path
QA's test rig does that.
2012-05-23 11:37:04 +02:00
Daniel Vetter
96c2fc82ba test/flip_test: fail harder
We want testcase to return non-zero if they fail ...
2012-05-22 19:54:22 +02:00
Daniel Vetter
17787f30c6 lib: extract kmstest_dump_mode 2012-05-22 16:15:15 +02:00
Daniel Vetter
b7aa6756ce test/flip_test: use kmstest_create_fb
And bring back some frame indication that actually works.
2012-05-22 16:12:04 +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
0732cc59ab tests: use drm_open_any more
And fix it up to not leak open fds, which kills all the master only
stuff.
2012-05-22 12:01:36 +02:00
Daniel Vetter
a5e6897d10 tests/flip_test: rip out usage
Totally useless if the only option is "-h"
2012-05-22 10:57:17 +02:00
Daniel Vetter
1fedd1db41 tests: add flip_test to .gitignore 2012-05-22 10:53:38 +02:00
Daniel Vetter
9e620146f7 tests/flip_test: rip out funny pictures
The path isn't properly autodetected and it yells stupid stuff into
stderr. Which causes spurious failures.

And really, these are automated tests. If you need to look at the output,
something is wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 10:51:29 +02:00
Daniel Vetter
544e357851 tests/gtt_speed: try to outwit gcc
It optimized away the read loops ;-)

Also fix up the size to not be 1/4th of the one we want for tiled
buffer tests.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-10 20:25:33 +02:00
Chris Wilson
78c38dcddb tests/gem_tiled_pread_pwrite fix progname for pretty print progress
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-05-09 14:06:28 +01:00
Jesse Barnes
e70b7de8ce tests/flip_test: test on each CRTC for each detected output
This allows us to test on 3 pipe configs for example.
2012-05-07 12:57:05 -07:00
Jesse Barnes
362599ac10 tests: add simple flip test
Add a simple flip test to test flipping on a single output with the
preferred mode.

TODO: test each crtc for 3s and print pass/fail results
2012-05-07 12:36:28 -07:00
Daniel Vetter
97198ccbe1 test/ZZ_hangman: adjust to new error_state reset semantics
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-27 14:08:34 +02:00
Daniel Vetter
bb40c7e8df test: fix up hangman script and enable by default
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-25 13:21:38 +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
Daniel Vetter
7e9676143c tests/gem_ringfill: add progress indicator
This thing takes ages on older chips.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-19 12:36:48 +02:00
Daniel Vetter
127d76d51c tests: re-enable commented-out testcase
Meh, I suck.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-17 22:38:44 +02:00
Daniel Vetter
16bc619939 tests: add gem_set_tiling_vs_pwrite
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-17 22:02:33 +02:00
Daniel Vetter
2f4bc72da7 tests/gem_set_tiling_vs_gtt: update copyright header
Meh, I've forgotten these.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-17 18:01:48 +02:00
Daniel Vetter
ff6abb313d tests: add gem_set_tiling_vs_gtt
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-17 17:25:24 +02:00
Daniel Vetter
48ec7f9edd tests/gem_set_tiling_vs_blt: fix on gen4+
Oops, the new checks need correctly tiled blts to work.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-17 13:25:04 +02:00
Daniel Vetter
b38188ad97 tests: rename gem_tiled_after_untiled_blt into gem_set_tiling_vs_blt
... it checks much more now.

Also update the comments a bit in the testcase.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-15 23:59:12 +02:00
Daniel Vetter
887e4a58b9 tests: pimp tiled_after_untiled_blt
Now with more tiling transition tests. Changes:
- refactoring to reuse the tiling transition functions.
- add a tiled->untiled transition
- add a tiled->tiled transition with different stride
- add a check at the end to ensure that the tiling has indeed changed
  on the test_bo

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-15 23:47:22 +02:00
Daniel Vetter
de9d98bb6e tests: skip rc6_residency test if not supported
Fixes spurious failures.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-12 23:12:24 +02:00
Daniel Vetter
8f6ebd4ac0 tests: add gem_gtt_concurrent_blit
Same test as Chris Wilson's gem_cpu_concurrent_blit, but for
gtt mmaps.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11 15:28:26 +02:00
Daniel Vetter
0448eefeb2 tests: add sysfs_rc6_residency to .gitignore 2012-04-11 15:02:32 +02:00
Daniel Vetter
ee014dbb8d tests/sysfs_rc6_residency: add some sleep before testing
That way I can run i-g-t on my ivb without spurious failures.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-11 14:55:30 +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
b78243fc61 test/gem_cpu_concurrent_blit: Limit memory usage to half aperture
So that we don't cause needless thrashing on older devices and spoil the
test.
2012-04-10 19:41:43 +01:00
Chris Wilson
da026d8bfe test: Exercise concurrent GPU read/write with CPU domain access
Designed to exercise this patch to i915.ko:

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fbf1118..57ae1f2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3181,9 +3181,11 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_obj
        if (ret)
                return ret;

-       ret = i915_gem_object_wait_rendering(obj);
-       if (ret)
-               return ret;
+       if (write || obj->pending_gpu_write) {
+               ret = i915_gem_object_wait_rendering(obj);
+               if (ret)
+                       return ret;
+       }

        i915_gem_object_flush_gtt_write_domain(obj);

By exercising the conditions whereby should either of the checks be missed
an error is detected.
2012-04-10 19:35:29 +01:00
Daniel Vetter
7601fafbcf tests: explicit use bash
We use bashisms, which debian's default sh dash doesn't like.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-10 16:23:18 +02:00
Ben Widawsky
af275bd521 tests: add wedging tests
Used to check that i915_error_state works. Unfortunately this
kills the gpu because wedging is permanent.

Base on a patch by Ben Widawsky.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-04 11:13:06 +02:00
Daniel Vetter
bb86947638 tests: fixup drm_lib.sh sourcing
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-04 11:13:06 +02:00
Daniel Vetter
e63f1870b4 tests: use / as path separator instead of _
Oops. Originally by me, noticed while reviewing Ben Widawsky's patch.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-04 10:56:50 +02:00
Ben Widawsky
888df75a0c tests: use common code for scripts
This removes cut and pasted code and uses a more central source.

Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-04 10:49:51 +02:00
Daniel Vetter
9dbce0991f tests: use gem_create and gem_close more
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-24 19:30:29 +01:00
Daniel Vetter
ff93f35151 tests/gem_fence_thrash: make some good use of drmtest helpers
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-24 19:22:21 +01:00
Daniel Vetter
11fa358503 tests/gem_exec_faulting_reloc: kill superflous mmap_bo
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-24 19:17:43 +01:00
Daniel Vetter
c34e481199 tests: add gem_tiled_after_untiled_blt
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-23 19:31:01 +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
9e531888ed tests: don't just bail out when there's not enough RAM
... but actually run the test with reduced memory requirements,
as the messages claims. Additional print it to stdout, stderr
seems to imply FAIL in our QA's testing rig.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-03-22 12:27:43 +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
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