1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().
Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
In some environments, we don't really want to loop 100000 times or
allocate 152352621 buffers because it makes the tests too long to run.
This adds a way to specify "quick" values to reduce the time taken by
certain tests.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
To make these helpers as least invasive as possible simply initialize
the options with a getopt parser and let the control flow be steered
with a simple helper which gets the subtest name as an argument.
The only tricky part for using it is that the subtest check helper
doubles up as the conduit to enumerate tests (and in that mode
prevents any test from being run). It is therefore important that
nothing gets printed to stdout outside of these checks.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Results in spurious 'warn' results in piglit. Also don't print
progress indicators when not outputting to a terminal.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
With the option '-r', the testdisplay could paint a 2-D bar code(QR
bar code) on the screen. The word "pass" is hiden in the bar code
image. Further more, with this option, testdisplay will wait until a
system signal 'SIGUSR1' coming after each mode setting. This function
is for another program to control testdisplay.
danvet: Fix up the missing static.
Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
When looking at the pwrite/pread/wc performance, it is useful to judge
that against the performance of an ordinary CPU mmap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
We should get more kms tests soon, and not needing to copy-paste a
nice test pattern should be useful.
That establishes a firm depency of i-g-t on cairo over everything, but
I don't care so much about that.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Unfortunately this requires slab poisoning to catch anything :(
Also add a new helper to drmtest to get the available fence count.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Although the address space for GTT mappings may only be 32-bits, we need
to use the explicit 64-bit mmap interface so that on a 32-bit platform
the offset we pass is not truncated to 31-bits.
Fixes gem_mmap_offset_exhaustion on 32-bit platforms.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Currently all we see is gem_read: ret == 0 failed, where it would help
to see the errno and/or the ret.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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>
Some test that trash the aperture necessarily need to take forever, so
add a little progress indicator to keep worried minds at peace.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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>
Some tests are higly timing dependent and others carelessly leave
active buffers behind. So add a helper to quiescent the gpu and call
it unconditionally when opening an fd in a vain attempt to make all
this race-condition hitting more scientifically sound.
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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>
This is vital in a multi-GPU system so that we only test the Intel card
and not the discrete GPUs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>