16 Commits

Author SHA1 Message Date
Chris Wilson
b09ef449af igt/gem_storedw_loop: Use common array of rings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27 14:47:19 +00:00
Michał Winiarski
52b5d5016e lib/ioctl_wrappers: Add gem_gtt_type exposing raw HAS_ALIASING_PPGTT param
No functional changes.
While I'm here, let's also rename gem_uses_aliasing_ppgtt (since it's
being used to indicate if we are using ANY kind of ppgtt) and introduce
gem_uses_full_ppgtt to drop some unnecessary code from tests that were
previously calling getparam directly instead of using ioctl wrapper.

v2: drop gem_uses_full_48b_ppgtt since it's no longer used anywhere,
    s/48b/64b (Chris)
v3: rebase

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-01-25 19:44:31 +01:00
Chris Wilson
a8f0963af5 igt/gem_storedw_loop: Add a few more iterations
Whilst still keeping the runtime down, extend the pipeline slightly.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 14:03:15 +00:00
Chris Wilson
e2b9dfd0aa igt/gem_storedw_loop: Remove libdrm crutches
Make the behaviour of the test more explicit wrt to the handle management,
mmap and domain handling.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19 14:03:15 +00:00
Thomas Wood
9edf293c45 gem_storedw_loop: fix segfault when listing subtests
Commit fb66cd5 (tests/gem_storedw_loop: Fix use after free for bufmgr)
introduced a segmentation fault when listing subtests because
drm_intel_bufmgr_destroy is called with NULL. Move this and the call to
the close function inside an igt_fixture block to prevent them being
called when listing subtests.

Cc: Robert Beckett <robert.beckett@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-24 11:04:34 +01:00
Robert Beckett
fb66cd5c34 tests/gem_storedw_loop: Fix use after free for bufmgr
Move bufmgr destruction to end of tests. This avoids use after free on
successive tests.

This could be squashed with the following patch to aid bisectability:

commit 0679702150157706a6def66b893b29c16345f4db
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Aug 5 16:06:31 2015 -0700

    tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2

Signed-off-by: Robert Beckett <robert.beckett@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-23 18:00:46 +02:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
2142a15d49 tests/gem_storedw_loop: remove redundant ppgtt check
All tests require ppgtt, so checking for it later on has no effect.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
673aab8a0a tests/gem_storedw_loop: skip on gen6 bsd
MI_STORE_DATA is broken on gen6 bsd.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Ander Conselvan de Oliveira
4c63f54de9 gem_storedw_loop: Skip test if device doesn't have requested ring
The VEBOX ring is not available in generations before Haswell, so make
tests that use it skip instead of fail in previous gens.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Thomas Wood
804e11f40d lib: add a single include header
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Jesse Barnes
0679702150 tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2
There was a lot of duplication going on...  Mark as basic while we're at
it as these should never fail.

v2: add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Daniel Vetter
32f49c7c0d tests: split up gem_storedw_loop into ring specific variations
Also start to shortly explain testcases with an easily-greppable
header like this:

/*
 * Testcase:
 *
 * [Possible further explanation.]
 *
 */

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-09-09 22:57:16 +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