27 Commits

Author SHA1 Message Date
Chris Wilson
10552b5ca6 batch: Specify number of relocations to accommodate
Since relocations are variable size, depending upon generation, it is
easier to handle the resizing of the batch request inside the
BEGIN_BATCH macro. This still leaves us with having to resize commands
in a few places - which still need adaption for gen8+.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-30 11:44:51 +01:00
Daniel Vetter
0b3407f528 tests/prime_nv_pcopy: Remove unused tiling tests
We now know that the hardware can't do this, and it's not designed to.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 11:41:55 +02:00
Daniel Vetter
ee90a4a0dc tests/prime_nv_pcopy: Drop return values from tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 11:39:31 +02:00
Daniel Vetter
a7294e0c22 tests/prime_nv_pcopy: Drop return values from copy/check functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 11:31:31 +02:00
Daniel Vetter
8710e302a4 tests/prime_nv_pcopy: Use asserts in setup code
Now we even have more fine-grained checking and only skip if the
nouveau card isn't supported, but fail properly if something else goes
wrong.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 10:57:46 +02:00
Daniel Vetter
782cda17b9 tests/prime_nv_pcopy: Use asserts in nv_bo_alloc
Step one to untangle the control flow in this test and replace it all
with igt assert magic.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 10:49:40 +02:00
Daniel Vetter
e624fa8a2e tests: sprinkle igt logging
All the cases that simply dump some debug information and couldn't be
converted to some of the fancier macros.

Some information output removed when it's redundant with the subtest
status.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-14 00:36:04 +02:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
e49ceb8690 lib: unnecessary header removal for drmtest.h, part 1
Brought a few missing headers to light in ioctl_wrappers.h, too.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:07:37 +01:00
Daniel Vetter
eb1fddc057 tests/primve_nv_pcopy: Comment out unused check_swizzle function
I've botched this in my patch to disable the swizzled pcopy test.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-15 23:58:50 +01:00
Daniel Vetter
fef1930bf3 tests/prime_nv_pcopy: disable swizzle tests
It's pure luck that nv can detile some of the intel layouts since one
of the video MC formats matches it. Since we can't possible fix this
comment the test out.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73538
Acked-by: Maarten Lankhorst <bugs@mblankhorst.nl>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 13:41:21 +01:00
Daniel Vetter
071e9ca1ca lib: add igt_main macro
In the past new testcases with subtest often forgot to add the call to
igt_exit at the end of their main() function. That is now caught with
a bit more obnoxious asserts, but it's still a nuissance.

This little igt_main macro takes care of that (and also of calling the
subtest machinery initialization code correctly).

If no one objects I'll roll this out for all the simple cases (i.e.
those tests that don't have additional argv parsing on top of the
subtest machinery).

v2: Roll it out across the board.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00
Daniel Vetter
b3880d3a96 tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean
up code while at it. To avoid gcc getting upset about unitialized
variables just move them out of main as global data (where they always
get initialized to 0) - gcc can't see through our igt_fixture and
igt_subtest maze properly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 18:02:46 +02:00
Daniel Vetter
a1ca8ef5b1 tests: use igt_exit() consistently with subtests
This is mostly important to get the SKIP reporting right, but I've
found a few stragglers that wanted to get converted over to the igt
result reporting completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 16:08:00 +02:00
Daniel Vetter
83440953e5 tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
1caaf0a6b6 s/drmtest_/igt_/
Requested-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 12:20:22 +02:00
Daniel Vetter
814b135541 s/drmtest_subtest_block/drmtest_subtest/
The _block postfix meant to convey that a C statement/block must
follow can be misread as the verb to block. So drop it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 12:15:16 +02:00
Daniel Vetter
9f6365e4ea lib/drmtest: Add drmtest_subtest_block macro
Doesn't do more than an if (drmtest_run_test(name)) right now, but
as soon as we get a bit of infrastructure to handle test failures and
skipping, this will get more interesting.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-12 11:10:26 +02:00
Daniel Vetter
5825cf807e tests/prime_nv_pcopy: guard output for subtest listing 2012-12-20 23:30:33 +01:00
Daniel Vetter
c2e05af353 tests/prime_nv_pcopy: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-15 15:57:20 +01: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
Maarten Lankhorst
c5b7ebc1cc tests/prime_nv_pcopy: kill debug code that's not upstream 2012-08-24 22:50:42 +02:00
Daniel Vetter
94ec3f926c tests/prime_nv: don't enable buffer reuse
We share these suckers, hence the fd-local libdrn instance does not
have full control over the lifecycle of the object. Prevents the tests
from blowing up with

[drm:i915_gem_mmap_gtt] *ERROR* Attempting to mmap a purgeable buffer

and similar things.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 15:45:09 +02:00
Maarten Lankhorst
1f523bd8d1 Fixup previous commit
ENODEV not being defined and return code wrong
2012-08-14 18:52:23 +02:00
Maarten Lankhorst
3dda357445 And add another corner case skip 2012-08-14 18:50:29 +02:00
Maarten Lankhorst
0f65ee9576 fix crash with insufficient permissions 2012-08-14 18:48:48 +02:00
Maarten Lankhorst
fc54f2eaa8 satisfy danvet's OC
and add skip codes, but mostly satisfy danvet's OCD
2012-08-14 18:25:50 +02:00