2241 Commits

Author SHA1 Message Date
Chris Wilson
d081953e67 igt/pm_rps: Trigger a real GPU reset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-01 20:09:34 +01:00
Chris Wilson
3dd5fe8ab2 igt/gem_exec_reloc: Exercise read-only relocation arrays
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-01 20:07:55 +01:00
Chris Wilson
aec81019e1 igt/gem_busy: Try to slow down execution
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>
2016-04-01 17:05:20 +01:00
Chris Wilson
92ee3cc1f6 igt/gem_busy: Cap number of tries to create busy rings
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-01 14:59:43 +01:00
Chris Wilson
0f5b03fa38 igt/gem_busy: Use a boatload of store-dwords to force ring busyness
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>
2016-04-01 13:21:56 +01:00
Chris Wilson
0bd117fa66 igt/gem_exec_suspend: Add basic selftest
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>
2016-03-29 13:53:22 +01:00
Chris Wilson
e56de3c900 igt/gem_exec_store: Exercise write ordering
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-29 11:20:22 +01:00
Chris Wilson
41a26b5152 igt/gem_exec_nop: Relax parallel assertion for short rings
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>
2016-03-28 16:27:24 +01:00
Chris Wilson
870c774b86 igt/gem_exec_nop: Add expectancy of independent execution between engines
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-28 15:41:08 +01:00
Chris Wilson
633854e8f4 igt/gem_ctx_switch: Add basic test for context switching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-26 11:22:04 +00:00
Chris Wilson
1a722fa6cf igt/gem_exec_whisper: Add simple interruptible pass
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-26 11:22:04 +00:00
Chris Wilson
5dcb026348 igt/gem_exec_whisper: Check for inconsistent reloc offset vs object offset
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-26 10:02:41 +00:00
Chris Wilson
3fd9b910d2 igt/gem_sync: Add a basic test to wait upon a batch on all rings
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>
2016-03-25 20:29:09 +00:00
Chris Wilson
9d61a685e9 igt/gem: Add GPU hang detection to basic tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25 18:26:46 +00:00
Chris Wilson
98dcf2f0dc igt/gem_concurrent_blit: Relax maxfiles restrictions
Only fail the dmabuf tests if we cannot prep the system to support
"unlimited" fd.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25 18:23:56 +00:00
Chris Wilson
6867b87b73 igt/gem_concurrent_blit: Enable hang detection
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>
2016-03-24 11:25:38 +00:00
Chris Wilson
756f3e0cb7 lib: Add a GPU error detector
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>
2016-03-24 11:25:38 +00:00
Chris Wilson
eb572106b4 igt/gem_shrink: Consume all of total ram in each process
"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>
2016-03-23 11:11:43 +00:00
Chris Wilson
a9436e6693 igt/gem_shrink: Include a shrinker vs GPU hang
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-23 09:54:22 +00:00
Chris Wilson
54ec3782dc tests: Add gem_shrink
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>
2016-03-23 09:41:54 +00:00
Lionel Landwerlin
7fc5256f56 test/kms_pipe_color: add test to verify legacy ioctl resets GAMMA_LUT
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>
2016-03-21 11:48:11 -07:00
Lionel Landwerlin
aa55641d4f tests/kms_color: New test for pipe level color management
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>
2016-03-21 11:47:54 -07:00
Chris Wilson
f1a3d0d96f igt/gem_ringfill: Fix basic- reversal
Rushed flipping around the logic to add basic- and forgot to apply the
corrected patch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21 14:40:51 +00:00
Chris Wilson
87a4d8ab64 igt/gem_ringfill: Fine-tune list of BAT tests
Drop -bomb as with forking * interruptible repeating, it takes too long
to include in the BAT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21 14:36:57 +00:00
Chris Wilson
a43f40741b igt/gem_exec_suspend: Add BAT runs
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>
2016-03-21 12:44:44 +00:00
Chris Wilson
a03ee8f6c8 igt/gem_exec_suspend: Allow suspend testing on gen6
Filter out the request to execute on gen6/bsd to prevent skips.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21 12:05:48 +00:00
Chris Wilson
d5e550f5c6 igt/gem_exec_whisper: Tweak migration logging
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>
2016-03-21 12:05:48 +00:00
Chris Wilson
fcb4cfa520 igt/gem_concurrent_all: Inject a hang onto all rings
Also test a hang across all rings, rather than just one engine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21 12:05:48 +00:00
Chris Wilson
3b22b89dd8 igt/gem_exec_whisper: Prevent MI_STORE_DWORD on gen6/bsd again
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-21 11:14:27 +00:00
Chris Wilson
c19b049d9c igt/gem_concurent_blit: Prevent a memleak if we assert whilst creating buffers
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>
2016-03-20 11:17:21 +00:00
Chris Wilson
3d8af56ed2 igt/gem_concurrent_blit: Reset process limits to allow dmabuf tests
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>
2016-03-20 10:51:09 +00:00
Chris Wilson
f338e9834c igt/gem_concurrent_blit: Enable quicker interruptible testing
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>
2016-03-19 15:59:27 +00:00
Chris Wilson
1abbd69740 igt/gem_softpin: Convert to igt_interruptible
Convert the fixed time interruptible tests to igt_interruptible() for a
speed improvement.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19 15:21:28 +00:00
Chris Wilson
22674ae88b igt/prime_mmap_coherency: Speed up interruptible testing
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>
2016-03-19 15:21:28 +00:00
Chris Wilson
83cfed8c39 igt/gem_exec_whisper: Add interruptibles tests
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-19 15:21:28 +00:00
Chris Wilson
87cad37c78 igt/gem_ringfill: Use igt_sigiter to focus the interruptible testing
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>
2016-03-19 15:21:28 +00:00
Chris Wilson
e85613b47c igt/gem_concurrent_blit: dmabuf requires twice the number of files
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>
2016-03-19 15:21:28 +00:00
Chris Wilson
c2248efbca igt/gem_concurrent_blit: Enable quicker interruptible testing
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>
2016-03-19 15:21:28 +00:00
Chris Wilson
d545610861 lib/igt_aux: Divert ioctls for signal injection
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>
2016-03-19 15:20:43 +00:00
Daniel Vetter
9665073c33 tests/gem_concurrent_blt|all: Use igt_subtest_group
Looks tidy again, and doesn't break igt assumptions.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-03-19 10:37:40 +01:00
Tiago Vignatti
f129ee8a39 prime_mmap_coherency: Add return error tests for prime sync ioctl
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]
2016-03-18 20:42:49 +00:00
Chris Wilson
5d669bf1dd igt/gem_concurent_blit: Exercise different object sizes
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>
2016-03-18 14:46:23 +00:00
Chris Wilson
4eba8e22fa igt/gem_concurrent_all: struct buffers for all
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>
2016-03-18 10:47:34 +00:00
Chris Wilson
dcb39b5270 igt/gem_softpin: Repeat tests with signal interruptions
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>
2016-03-18 09:20:06 +00:00
Chris Wilson
5df2de7e14 igt/gem_exec_whisper: Move testing of "default" engine to standalone
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>
2016-03-17 09:51:02 +00:00
Ville Syrjälä
c8d5c353bf tests/pm_rps: Fix assert for sysfs writes
fprintf() returns a negative value on error. Fix the assert
to catch that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-03-16 19:58:09 +02:00
Imre Deak
f651493a6b igt/drv_module_reload_basic: Pass correct inject_load_failure module option
The latest version of the inject_load_failure module option expects the
number of the checkpoint where the failure should be injected, so adjust
the test accordingly.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2016-03-15 23:21:23 +02:00
Mika Kuoppala
431f6c4918 tests/gem_evict_alignment: use uint64_t in eviction memory parameters
With large apertures we need to use uint64_t for
counts and sizes. commit 0e2071411a4d4e1488a821daf522dffde2809e03
paved way for this but forgot to change the subtest parameters.

v2: Pass correctly to the copy() also (Chris)

References: https://bugs.freedesktop.org/show_bug.cgi?id=93849
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-03-15 14:58:32 +02:00
Chris Wilson
314fa179c8 igt/gem_bad_reloc: Rename conflicting negative-reloc-blt
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15 09:45:18 +00:00
Chris Wilson
488dc3b1ac igt/gem_exec_whisper: Beware PIN_HIGH
Certain kernels/gen like to move execbuf around for relocations,
disrupting our prewritten batches. Be more careful and try and keep the
relocation/execobjects accurate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-15 09:18:31 +00:00