33 Commits

Author SHA1 Message Date
Imre Deak
6b418f0264 tests/gem_storedw_batches_loop: add subtest for cached mappings
v2:
- add a subtest for uncached mappings too for LLC platforms where the
  default is cached mapping (Chris)

Signed-off-by: Imre Deak <imre.deak@intel.com>
2015-06-08 20:27:47 +03:00
Matt Roper
07be8fec15 igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible
The integer comparison macros give us better error output by including
the actual values that failed the comparison.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-06 18:06:10 +01:00
Daniel Vetter
f893535141 Revert "Revert "store_dw_loop: make loops smaller""
This reverts commit 3005ac3ee8d7aede73a3e63d2068a6074156ebe5.

QA has done the testing we've wanted.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-22 09:07:45 +02:00
Daniel Vetter
3005ac3ee8 Revert "store_dw_loop: make loops smaller"
This reverts commit f00efff326610fdba92dbc91d951790a3320052e.

This is a temporary revert since I want QA to first test with the
original testcase whether it got faster again. This is to test the
effects of

commit 227f782e4667fc622810bce8be8ccdeee45f89c2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu May 15 10:41:42 2014 +0100

    drm/i915: Retire requests before creating a new one

We should revert this revert again as soon as QA has completed
testing.

References: https://bugs.freedesktop.org/show_bug.cgi?id=78024
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-05-19 18:11:34 +02:00
Jesse Barnes
f00efff326 store_dw_loop: make loops smaller
These tests are really for catching TLB or GTT mapping failures due to
bad programming in the kernel driver.  We've never needed more than a
few pages worth of data write to actually see those.
2014-05-19 08:44:12 -07: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
0e22f14ed6 tests|lib: remove assert.h includes
Only the igt core and non-test tools should have asserts to catch
internal errors, tests and helper libraries should all user igt_asert
instead.

Fix things up where assert instead of igt_assert was used.

One tiny step towards header sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 19:39:46 +01:00
Ben Widawsky
1bbb607d9f gem_storedw_batches_loop: Fix for pre-BDW
My git failures are truly remarkable. I ended up pushing the wrong
commit here:
commit 1552aa21124cabe762862bb414490510415a2b2d
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Mon Jan 13 06:28:45 2014 -0800

    gem_storedw_batches_loop: Fix for BDW

This puts the offset of the reloc in the wrong place for pre-BDW

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73866
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-21 18:03:42 -08:00
Ben Widawsky
1552aa2112 gem_storedw_batches_loop: Fix for BDW
Existing code was trying to be too clever and wasn't properly emitting
the high dword, or the correct length.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-13 06:28:45 -08:00
Ben Widawsky
97e48cd619 gem_storedw_batches_loop: Fix for real this time
Last patch to fix the breakage when adding gen8 had bugs in the reloc
offset, and size field.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-11 13:33:04 -08:00
Ben Widawsky
26d237cdc2 gem_storedw_batches_loop: Update for gen8
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 21:00:55 -08: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
780807099a tests: Use igt_exit for tests with subtest
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-10-29 11:15:43 +01:00
Daniel Vetter
64cfe4eefe lib/drmtest: Improve printf-like igt_skip_on/require
Ben Widawsky suggested to use vasprintf, which perfectly fits the bill.

Also fix the logic conversion bug in tests/gem_storedw_batches_loop that
crept in again :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19 19:56:03 +02:00
Daniel Vetter
e5cdd62624 lib/drmtest: igt_assert|require with format strings
v2: Add a comment about the pitfalls around va_list handling.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19 19:40:32 +02:00
Daniel Vetter
b352512953 tests/gem_stored_batches_loop: use igt_assert more
Terser code ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-19 15:51:33 +02:00
Daniel Vetter
0a587e24b7 tests/gem_storedw_batches_loop: Add testcase to check secure dispatch
v2: Use the mrb_exec function since otherwise we can't pass flags.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-18 18:37:10 +02:00
Daniel Vetter
5e25fcc285 tests: use igt_fail instead of exit(param != 0)
Mostly a sed job with too manual fixups:
- one case of using _exit instead of exit
- and one case which under some conditions use 77, so convert that
  check to an igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:15:17 +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
Damien Lespiau
d1e862324b tests: Instrument tests run in simulation to run quickly
We tweak the tests marked as runnable in simulation to run more quickly,
more often then not at the expense of stress testing (which is of an
arguable interest for the initial bring up in simulation). Hopefully the
values chosen still test something, which is not always straightforward.

It does run quickly, the number on an IVB machines are:

$ time sudo IGT_SIMULATION=0 ./piglit-run.py tests/igt.tests foo
[...]
real	2m0.141s
user	0m16.365s
sys	1m33.382s

Vs.

$ time sudo IGT_SIMULATION=1 ./piglit-run.py tests/igt.tests foo
[...]
real	0m0.448s
user	0m0.226s
sys	0m0.183s

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:56:35 +01:00
Damien Lespiau
5fa15f79d0 tests: Black list tests we don't want to run on simulation
Let's start by a small set of tests, to eventually consider running
more.

The current list should then be:

gem_mmap
gem_pread_after_blit
gem_ring_sync_loop
gem_ctx_basic
gem_pipe_control_store_loop
gem_storedw_loop_render
gem_storedw_loop_blt
gem_storedw_loop_bsd
gem_render_linear_blits
gem_tiled_blits
gem_cpu_reloc

gem_exec_nop
gem_mmap_gtt

v2 add (Daniel Vetter)
gem_exec_bad_domains
gem_exec_faulting_reloc
gem_flink
gem_reg_read
gem_reloc_overflow
gem_tiling_max_stride
prime_*

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-18 15:49:02 +01:00
Damien Lespiau
50c45f9586 tests: Add a quick variant to the gem_storedw_* 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
Imre Deak
6456e75f0d fix warn: 'div' shadows a global declaration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:02 +02:00
Daniel Vetter
1422c22e89 tests/*storedw*: add subcases with more outstanding batches
Just in case this is better at hitting seqno signalling races ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-04 13:22:16 +02: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
8c7f8bcccb tests: properly terminate tests when values mismatch
Not much use running them in the test rig otherwise.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 01:37:59 +01:00
Daniel Vetter
19d69955d2 tests: exit(77) to properly mark tests as SKIP
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-13 11:05:13 +02:00
Daniel Vetter
d1aae145a7 tests/gem_storedw: disable on pre-gen6
Doesn't work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 22:57:16 +02:00
Daniel Vetter
49cd753a77 test/gem_storedw_*: tune some more
MI_*/PIPE_CONTROL writes need to be in DOMAIN_INSTRUCTION, because
that is what mesa uses and I plan to use this to work around a
gen6 ppgtt issue.

Also testing with intentionally b0rked GFX_MODE on my snb shows that
we need to increase the loop counter a bit to reliably hit the tlb
invalidation problem. Test still completes within a few seconds.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 17:24:16 +02:00
Jesse Barnes
922214f986 tests: add store dword tests
Add a couple of simple store dword tests to test memory coherence.

gem_storedw_loop simply executes a batch that continually stores an
incremented value to a target buffer object, checking the results after
each batch completes.

gem_storedw_batches_loop does the same thing, but creates a new command
batch buffer for each iteration, which can exercise the buffer creation
code.  This test is based on one from Andrzej Kacprowski from Intel.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-08-12 12:51:34 -07:00