66 Commits

Author SHA1 Message Date
Ville Syrjälä
725da6ee74 rendercopy: Pass context to rendercopy functions
rendercopy does the batch buffer flush internally, so if we want
to use it with multiple contexts, we need to pass the context
in from caller.

v2: Modify rendercopy_gen8 as well

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2013-11-27 16:21:28 +02:00
Ben Widawsky
f4dfa37e85 bdw: Update obvious missing blit support
This provides a macro that allows us to update all the arbitrary blit
commands we have stuck throughout the code. It assumes we don't actually
use 64b relocs (which is currently true). This also allows us to easily find
all the areas we need to update later when we really use the upper dword.

This block was done mostly with a sed job, and represents the easier
in test blit implementations.

v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06 09:34:35 -08:00
Daniel Vetter
14e12b8008 tests/*: scrap get_num_fences
Just use gem_available_fences directly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-17 00:13:47 +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
Ville Syrjälä
1d1f68316f tests: Use gem_available_fences()
lib/drmtest.c provides gem_available_fences(). Use it where
appropriate.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-09 20:21:13 +02: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
Ben Widawsky
beb1bb8fd2 gem_stress: use the gen7 rendercopy
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-06-28 22:52:04 -07:00
Daniel Vetter
fbfe374b28 lib: extract drmtest_permute_array
Lots of tests need to create havoc to LRUs in the kernel or otherwise
need to shuffle things around a bit. So make a small array permutation
function available.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-22 20:09:54 +01:00
Daniel Vetter
1357427fd0 gem_stress: s/gem_stress.h/rendercopy.h 2012-01-18 17:53:12 +01:00
Daniel Vetter
f7c2dab5bd gem_stress: move keep_gpu_busy stuff out of render copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:51:48 +01:00
Daniel Vetter
b9fe673f49 gem_stress: move option struct out of header
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:47:33 +01:00
Daniel Vetter
9f20ecc3b3 gem_stress: add width/height arg to rendercpy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 17:46:00 +01:00
Daniel Vetter
699d30950f gem_stress: move a few things out of gem_stress.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 01:12:52 +01:00
Daniel Vetter
f1de285e7e gem_stress: pass batch as arg to render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:55:49 +01:00
Daniel Vetter
72f74ce355 gem_stress: remove logical_tile_no arg from render_copy functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:36:37 +01:00
Daniel Vetter
205510badf gem_stress: add buf->size
Removes a dependency on gem_stress internals from the rendercpy
functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-18 00:34:15 +01:00
Daniel Vetter
7f944349ef lib/drmtest: extract gem_aperture_size
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-15 17:14:56 +01:00
Daniel Vetter
cbaa8a389e lib/drmtest: extract helpers for signal interruptions
Also add some hackish stat to check it works.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-11 15:33:00 +01:00
Daniel Vetter
673e6b220a lib/drmtest: extract gem_set_domain and gem_sync
gem_sync just does a gtt sync by using set_domain(GTT, GTT).

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 16:05:34 +01:00
Daniel Vetter
aa67b22e42 lib/drmtest: extract gem_set_tiling
Way too much copy-pasting going on here.

Also fix a compiler warnings in gem_stress while fixup things up.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-10 14:59:58 +01:00
Chris Wilson
ceb9f7d934 tests/gem_stress: silence the compiler by using '%zu' for size_t
gem_stress.c: In function ‘main’:
gem_stress.c:980:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat]
2011-12-14 17:39:42 +00:00
Daniel Vetter
7af82bb0e5 tests: implement snb+ XY_SETUP_CLIP_BLT workaround
Better safe than sorry.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 02:39:14 +01:00
Daniel Vetter
74670c7bb9 gem_stress: ducttaping mandatory
In other news: We've been missing a unmapping_mapping_range somewhere
in the kernel. But lazy me never came around to digging up the real
cause.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-07-17 23:33:27 +02:00
Chris Wilson
75f7e81fbc gem_stress: Assert we have no pending ops when using the CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-08 14:04:24 +01:00
Chris Wilson
4227da8c3c gem_stress: Add an option to test handling of signals
As signals cause the syscalls to be interrupted, we often need to clean
up partial state before returning to userspace. Often a source of
unamusing bugs, so encourage gem_stress to provoke them.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-07-02 09:13:20 +01:00
Daniel Vetter
336f85dafb gem_stress: some stats about incoherencies
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 22:02:52 +02:00
Daniel Vetter
1007956680 gem_stress: option to disable render copyfunc check
Too noisy - which is an another way of saying too broken :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 20:30:31 +02:00
Daniel Vetter
5b253cee37 gem_stress: option for tile_size
I want to know how large these corruptions can get!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 20:30:30 +02:00
Daniel Vetter
c0f34338e7 gem_stress: option to set tiles per buffer
gem_stress -p1 is much more evil than gem_stress -c1, it also manages
to tear appart untiled workloads!

Now duct-taping over it still works (--apply-duct-tape) ... hm.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 13:18:35 +02:00
Daniel Vetter
6daa883fa3 gem_stress: option to continue despite failures
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 00:35:01 +02:00
Daniel Vetter
9649dd7ef0 gem_stress: option to override the number of rounds to complete
gem_stress -c 1

... sometimes takes a while to hit a problem.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-13 00:58:45 +02:00
Daniel Vetter
1095a825c0 gem_stress: avoid division by 0
Without this height would be 16 with the minimal buffer size.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-06 20:16:35 +02:00
Daniel Vetter
fde66f9bf4 gem_stress: disable fence storm when only using untiled buffers
This explains why gem_stress -u worked beforehand - the rendercpy
was not actually used!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-06 20:15:44 +02:00
Daniel Vetter
7250328bb8 gem_stress: round max_dimension down to the next pot
Creates funny rounding problems otherwise.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-06-06 18:59:54 +02:00
Chris Wilson
3d66d913d9 gem_stress: trim buffer sizes to fit into 3D pipeline
Remember the 3D pipeline is much more restricted than the BLT engine,
and we were feeding it buffers much larger than either the
render engine or the sampler could manager.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-05 22:21:54 +01:00
Chris Wilson
2933547eb0 gem_stress: cpu maps force tiling to be disabled, so fix the printf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-05 21:36:06 +01:00
Chris Wilson
bfa23b47a5 gem_stress: Add extra passes to intial render copyfunc verification
...and allow for cpu maps!
2011-06-05 21:34:07 +01:00
Chris Wilson
f5e63b12a5 test: Add more gen3 render blitters
... and we have a winner: gen3_mixed_blits reproduces the issue Daniel
Vetter originally found. It seems clear that we have some incoherence
between the RENDER and BLT units on gen3 that no amount of MI_FLUSH can
hide. Hmmm....

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-06-05 18:12:47 +01:00
Chris Wilson
4e1f2f5957 gem_stress: '-b' option to disable BLT copyfunc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-25 13:43:33 +01:00
Chris Wilson
719ffef7c3 gem_stress: Add render copyfunc for SandyBridge
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-05-24 22:08:48 +01:00
Daniel Vetter
b11d67a33b gem_stress: option to use cpu mappings
This things just won't die (libva!!!), so add an option to test them.

_Not_ meant to test snoopable mappings.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-27 22:18:23 +02:00
Daniel Vetter
a67091b220 gem_stress: option to only use x-tiling
This seems to be another trick to massively improve correctness
of the render blit. At least on my i945.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-12 22:57:08 +02:00
Daniel Vetter
e68652cad6 gem_stress: option to disable tiling
Of all the things I've tried, this seems to be the only thing
to fix tile corruptions reliably on gen2&gen3 (safe for outright
disabling the render copy).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-04 22:13:09 +02:00
Daniel Vetter
272c898807 gem_stress: clean up fence_storm
That little snippet creapt in and magically made render copy work -
by essentially disabling it.

Restore order, everything incoherent again.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-04 22:11:19 +02:00
Daniel Vetter
aeb0b6f33c gem_stress: extract emit_blt
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-04 22:03:44 +02:00
Daniel Vetter
4fcfc9f102 gem_stress: gen2 render copy
Sometimes acts up like gen3 on my i855gm. Sometimes works flawless.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-04 22:03:44 +02:00
Daniel Vetter
a6751bac8d gem_stress: split out gen3 render copy
Header conflicts with other headers for different generations.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-04-01 13:07:43 +02:00