12 Commits

Author SHA1 Message Date
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
0a8bfbf747 tests/gem_fence_trash: make threaded tests more through-rough
With this at least the y-tiled test reliably fails on my machines, but
x-tiled still passes on some. More ideas to tune this highly welcome.

v2: Fill cpu caches with data for each newly allocated bo. This seems
to do the trick on my snb here _really_ reliably. So apparently the
backsnoop for llc gtt writes is the crucial ingredient here to make
the test fail.

While at it, also stop leaking mmap space.

v3: Fixup commit message.

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-04-08 09:47:58 +02:00
Chris Wilson
74f6e413d3 gem_fence_thrash: Fix array allocation size for LP64 systems 2013-03-27 11:33:24 +00:00
Mika Kuoppala
ee79b8fccd tests: add write-verify test to gem_fence_thrash
Add write-verify test to gem_fence_thrash. Test will create
multiple threads per fence then verify the write into fenced region.

v2: non-threaded, non-tiled tests added. suggested by Chris Wilson.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-03-27 12:23:58 +01:00
Damien Lespiau
7ee278f176 build: Guard the inclusions of config.h with HAVE_CONFIG_H
autoconf can be configured to not generate a config.h but to give the
defines with command line arguments instead. In this case, there's no
config.h to include.

To work in both cases autoconf adds a HAVE_CONFIG_H define on the command
line to signal there's a config.h to include.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-03-04 15:45:34 +00: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
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
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
Alan Coopersmith
504c4fa94f Fix pthread compiler flags to work on Solaris and with Studio compiler
AC_USE_SYSTEM_EXTENSIONS is used to let autoconf take care of setting
the right system defintions for POSIX threads & similar extensions to
the base POSIX API.   Since it will also #define _GNU_SOURCE 1, remove
the extra setting to avoid compiler warnings about redefined macros.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Alan Coopersmith
00751594db Use sched_yield instead of pthread_yield
Despite the name implying it's a standard part of the POSIX threads API,
pthread_yield is actually non-standard and less portable than sched_yield.
For instance, Solaris only has sched_yield, and not pthread_yield.
Since even the Linux man page suggests using sched_yield, just call that.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-08 21:49:03 +01:00
Daniel Vetter
2e9e27ce6b tests/gem_fence_trash: some retuning
We actually want to test lru behaviour, so do a bit of work with
the fence before yielding to the next thread (we use twice as many
fences as there are, so yielding always is pretty bad, no matter how
clever our fence stealing).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-15 13:46:19 +02:00
Chris Wilson
8f3f862b96 Add gem_fence_thrash test
This is a test case that overcommits fence registers between threads, which
are copying from one fenced bo to another. In earlier versions of the driver
this would cause excessive spinning as the first inactive (i.e. not in use
by the GPU) would be used to service the next page. After all the fence
registers had been allocated, in effect only the very first fence would then
be used for all subsequent faults.
2009-09-01 11:53:47 +01:00