Hitting oom from userptr because we had N threads all consuming all of
memory, wasn't the intention but the bugs it found were useful!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
With lockdep enabled, the driver overhead is enormous and we need to
slow down the GPU to compenstate (otherwise the GPU is already idle when
we expect busyness). So do more work per batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
A little more inelegant as we can't control the delay very well, but it
should prove more vesatile and broaden the test coverge (and still be
quick enough for basic).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The selftest is already before the suspend/hibernate tests, but to be
clear also run it first (it only takes a millisecond) by itself.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
On bdw, the render ring becomes full and limits dispatch across all rings.
Adjust the expected latency to take this into account.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Execute the batch concurrently on all rings and then wait (as opposed to
executing a different batch on each engine).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
When we aren't deliberately injecting hangs, we don't expect to see any
GPU hang. Detect them and fail early.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If we listen to the uevents from the kernel, we can detect when the GPU
hangs. This requires us to fork a helper process to do so and send a
signal back to the parent.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
"Leak" the objects from each test until each process has allocated
enough objects to consume all of RAM.
Doing so from each process not only ensures we do stress the allocation
paths, but also obsoletes the separate purgeable helper.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This test exercise purely to exercise the shrinker under some common
stress (i.e. paths leading to i915_gem_object_get_pages()). We try to
fill the entirely of memory split amongst many processes so that each
individual process only consumes a small fraction of RAM (less than the
mappable aperture) and a single process should not be individually
blamed.
Based on an idea to have a seperate set of memory stress tests by Piotr
Luc.
Cc: Piotr Luc <piotr.luc@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The GAMMA_LUT/DEGAMMA_LUT/CTM properties must be updated when the
legacy ioctl is triggered to ensure the new properties do not impact
older userspace code.
v2: Add checks verifying the content of CTM & DEGAMMA_LUT properties
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This test enables testing of :
* degamma LUTs
* csc matrix
* gamma LUTs
* legacy gamma LUTs
v2: turn assert into require to skip on platform not supporting color
management
v3: add invalid blob ids tests
v4: Try to match CRC results against several values around the
expected result for platforms with odd LUT items
v5: Fix running tests with multiple screens
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Add a couple of all-engine busy tests in order to exercise coherency and
general bugs across suspend. (In particular, I expect this to trigger a
fresh case of lockdeps on Braswell, as well as the usual battery of
missing rpm references. This is an exerciser for my lockless-suspend
patches.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
reloc.presumed_offset == -1 => implies we hit the fallback path and not
that we strictly needed to patch the relocation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Assume that we may halt partway through buffers_create() and so be
careful to clear up the partial state in buffers_destroy().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Since dmabuf requires an actual fd for every object, we need to increase
the number of files our process is allowed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
v2: Because I managed to push the wrong version.
Make --list-subtests happer by creating the name before the igt_fixture,
not inside it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the new fangled igt_interruptible() to limit the number of passes we
require when performing signal injection.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the igt_sigiter interface to repeat the ringfill testing for as much
as is required to exercise all potential injection sites.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In order to keep the dmabuf mmap around whilst we keep the object alive,
we need a file descriptor for each. Check that the VFS supports that
many fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the igt_sigiter interface to only repeat the -interruptible tests
when we can make further progress with another change at injecting a
signal.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
To simplify and speed up running interruptible tests, use a custom
ioctl() function that control the signaling and detect when we need no
more iterations to trigger an interruption.
We use a realtime timer to inject the signal after a certain delay,
increasing the delay on every loop to try and exercise different code
paths within the function. The first delay is very short such that we
hopefully enter the kernel with a pending signal.
Clients should use
struct igt_sigiter iter = {};
while (igt_sigiter_repeat(&iter, enable_interrupts=true))
do_test()
to automatically repeat the test until we can inject no more signals
into the ioctls. This is condensed into a macro
igt_interruptible(enable_interrupts=true)
do_test();
for convenience.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This patch adds ioctl-errors subtest to be used for exercising prime sync ioctl
errors.
The subtest constantly interrupts via signals a function doing concurrent blit
to stress out the right usage of prime_sync_*, making sure these ioctl errors
are handled accordingly. Important to note that in case of failure (e.g. in a
case where the ioctl wouldn't try again in a return error) this test does not
reliably catch the problem with 100% of accuracy.
v2: fix prime sync direction when reading mmap'ed file.
v3: change the upper bound using time rather than loops
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
[ickle: fix memleak, run for longer]
Searching for coherency problems that may arise with
smaller-then-cache/large-then-cache objects.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Now that we started packaging all parameters in one handy struct, pass
them everywhere. This allows us to pass along requirements so that we
can perform the checks inside each indvidual subtest and so not anger
the igt gods.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
For the long running tests probing error conditions, throwing in the
signal interruptions is a good idea.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Exclude the symbolic "default" engine from the interengine sync testing,
and move it onto the standalone testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>