2303 Commits

Author SHA1 Message Date
Chris Wilson
4a62f0b43f igt: Add gem_exec_parallel
Attempt to fill buffers using many clients working in parallel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-27 18:37:35 +01:00
marius vlad
abc8aa40de tests/gem_close_race: Add igt_fixture block for igt_stop_hang_detector.
igt_fork_hang_detector() was called from a igt_fixture block, while its
counterpart (igt_stop_hang_detector) was called normally, causing
SIGTERM to be sent when running under check target.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-26 21:31:37 +03:00
Chris Wilson
102943d1ba igt/gem_busy: Avoid BSD emission on gen6
Remember to skip using BSD on gen6, unless you want to kill the machine.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95134
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-25 18:52:05 +01:00
Robert Foss
81864b55b0 core_getversion: Only verify major version for i915.
This change mirrors the change in drm made by krh@redhat.com
on "Mon Apr 6 17:18:17 2009" on the drm branch intel_on_all_hw.

The assert(major < 1) is only needed for the legacy intel driver.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-25 15:27:30 +02:00
Robert Foss
4aeed6e829 core_getversion: Switched from igt_assert to assert helpers.
Switched to assert helpers to enable better error output.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
[tomeu: fix test of major version to be lte]
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-25 15:27:30 +02:00
marius vlad
8753f77692 tests/gem_busy: Fix passing invalid fd for basic-parallel-* tests.
Caught by check target.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-25 15:56:37 +03:00
Tomeu Vizoso
b7135575e7 tests/kms_flip_event_leak: Open DRM device with DRIVER_ANY
So that this test can be run in drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Series-version: 1
Series-to: intel-gfx
Series-cc: padovan, daniels, marcheu, seanpaul, xexaxo, fedkem, mvlad, danvet
Series-prefix: i-g-t
Cover-letter:
Make more tests generic
Hi,

these patches allow a few more tests to run on drivers other than i915,
mainly by removing the last usage of
DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID and removing superfluous dependencies
on bufmgr and tiled BOs.

Thanks,

Tomeu
END
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
0b741cec0e tests/kms_flip_event_leak: Use non-tiled formats
As the test doesn't actually need tiled BOs, drop the tiled formats so
the test can run on drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
857b8b47d1 tests/kms_flip: Open DRM device with DRIVER_ANY
So that this test can be run in drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
52a5518c3e tests/kms_flip: Move bufmgr requirement into subtests
Because bufmgr is currently a i915-only thing and it's only needed in a
subset of the subtests, require it only in the subtests that actually
need it so that the other subtests aren't skipped without a reason.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
39eb7043e6 tests/kms_flip: Create tiled BOs only when needed
Because attempts to create a tiled BO will cause a igt_require call to
fail on drivers that don't support tiling, do so in the subtest that
actually needs it so that other subtests aren't skipped without reason.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
331585573c tests/kms_render: Move dependency on i915 into subtest
Batchbuffers are only needed in the subtest that does the blit on the
GPU, so move that dependency into it so the other subtest can be ran on
!i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tomeu Vizoso
a8be527172 tests/drm_read: Drop DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID
So the test runs on other drivers, drop the usage of the i915-specific
DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl.

Wait for a vblank event on pipe0 and if we get it, then the test can
proceed (code copied from kms_vblank).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-04-25 14:21:35 +02:00
Tvrtko Ursulin
660147488e kms_flip: Shorten basic tests a bit
Seems like an overkill for a basic test to keep flipping for
a full minute. Dial it down a bit.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-25 13:20:14 +03:00
Chris Wilson
14f7959038 igt/gem_close_race: Restore threads test to BAT status
Let's try it again because it would have caught a bug in a patch I sent
to the ml...

References: https://bugs.freedesktop.org/show_bug.cgi?id=95048
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-25 10:58:26 +01:00
Chris Wilson
13cfccd665 igt/gem_busy: Test parallel execution
Parallel but not concurrent!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-25 09:35:20 +01:00
Chris Wilson
1e9a3acfd4 igt/gem_busy: Discard the indirect batchbuffers
The stack of batchbuffers is myth. In general there are only 2 levels of
stack for HEAD (ringbuffer, batchbuffer) and chaining up the batch
buffer just updates the lowest level of the stack. A BATCH_BUFFER_END at
any depth then returns to the ring.

So be creative and modify the batch buffer on the fly...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-22 19:31:06 +01:00
Chris Wilson
71f4153287 igt/gem_exec_nop: Apply missed interrupt detection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-22 16:56:03 +01:00
Chris Wilson
2f859537b5 igt/gem_close_race: Import the scratch
Rather than create a new scratch buffer every pass, import the original
as this provides stress upon less commonly trod paths (i.e. handling
objects with many vma) as well as many objects in general.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-22 16:46:15 +01:00
Chris Wilson
757b9be460 igt/gem_close_race: Avoid using threads, use signals instead
Emulate the behaviour of the second thread killing fd at random by
having a signal fire at a random time instead. Only one thread and so we
do not have the issue of accessing another valid handle on another fd
and so executing a blank buffer - triggering GPU hangs.

References: https://bugs.freedesktop.org/show_bug.cgi?id=95048
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-22 16:05:33 +01:00
Marius Vlad
de4f3ab418 tests/gem_close_race: Remove basic-threads from BAT.
Currently this test causes some machines to hang and segfaults on others.
Rename it for now until we figure out the root cause.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95048
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-21 20:57:06 +03:00
Chris Wilson
f650aa2dd6 igt/gem_close_race: Batify
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-20 18:48:23 +01:00
pvishwak
8b8d7aaffd tests/kms_rotation_crc: Adding rotation tests using COMMIT_ATOMIC path
Modified kms_rotation_crc to follow COMMIT_ATOMIC path if ATOMIC support is
available from driver. If ATOMIC support is not present, tests
will follow COMMIT_UNIVERSAL path.

v2: (Marius)
	Updated commit message
	https://patchwork.freedesktop.org/patch/76040/

v3: (Marius)
	Added description in commit message
	https://patchwork.freedesktop.org/patch/79492/

Signed-off-by: Pratik Vishwakarma <pratik.vishwakarma@intel.com>
[mcvlad: Re-worked a little comment description]
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-20 19:49:49 +03:00
Robert Foss
a256df9dc6 kms_atomic: Fix crtc_id comparison failing.
Fixed ctrc_id comparison failing due to bad initialization of
crtc variable.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-20 18:53:56 +03:00
Feceoru, Gabriel
a633ad03c6 tests: Separate tests with lots of subtests
Currently, when trying to run i-g-t tests with piglit, it takes up
to 20s until the first test is executed.
The main reason is that gem_concurrent_all has ~500k subtests,
overkilling piglit.

This patch separates gem_concurrent_* tests from the rest of the tests,
creating two files test-list.txt and test-list-full.txt.
The piglit can now enumerate the i-g-t tests within a decent few seconds.
The second list could be used when trying to execute specific these tests.

v2: Rebased

Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-20 18:16:43 +03:00
marius vlad
f8af3565bd tests/kms_pipe_crc_basic: Don't suspend the machine if the pipe is not present.
suspend-read-crc-pipe will perform a suspend and then skip the test in case the
pipe is not present or is fused w/ another pipe.  Skip the test before doing
the suspend.

v2: Somehow the subject was trimmed.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-20 13:48:04 +03:00
Bob Paauwe
e3e00bae23 ksm_pipe_color: Set legacy gamma values inside loop.
When testing multple outputs, make sure to set the gamma values before
testing the output.  Otherwise we're testing using the gamma values
that were reset after last output was tested.  Without this, the first
output passes, but each output after that will fail.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-04-20 13:39:50 +03:00
Chris Wilson
459ff6b7e2 igt/gem_concurrent_blit: Ensure we only shrink the child buffers
As we reuse the parent arrays under the assumption that the child uses
fewer buffers, make sure that is true.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-20 07:50:18 +01:00
Chris Wilson
77b8a5bfd3 igt/gem_exec_nop: Fix time units for assertion printf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-18 10:27:17 +01:00
Chris Wilson
ca4f42ba17 igt/gem_ctx_param: Relabel
Checking parameters is not interesting for BAT, it is a simple ABI test
that only provides coverage of the CONTEXT_GETPARAM and CONTEXT_SETPARAM
ioctls, and no deeper.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-18 10:27:17 +01:00
Chris Wilson
7bd2ac6642 gem_exec_lut_handle: Fix presumed_offset to force relocation on full-ppgtt
If the object is at offset 0, quite likely using full-ppgtt, then the
presumed_offset set also to 0 causes the relocation to be skipped.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-16 17:17:19 +01:00
Chris Wilson
c84853ba32 igt/gem_mocs_settings: Check for pollution of default contexts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15 12:25:43 +01:00
Tvrtko Ursulin
cfb9e8ec29 igt/drv_module_reload_basic: Do not require snd-hda-intel
Recent refactoring has made absence of snd-hda-intel a test
failure do the respective modprobe being at the end of a
reload function now.

Only fail in this case if module was previously unloaded.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15 11:26:45 +01:00
Tomeu Vizoso
da3ae5c861 tests/kms_addfb_basic: Set tiling in addfb25 subtest
When moving the call to gem_set_tiling into the subtests, the one needed
by addfb25-framebuffer-vs-set-tiling was left out.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-04-15 11:26:14 +01:00
Chris Wilson
e0145eabba igt/gem_pwrite: Add backwards/random access patterns
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15 11:09:23 +01:00
Chris Wilson
4233b59608 igt/gem_busy: Slow down the writer
Add a few more (128) loops to the page full of MI_STORE_DWORD in an
attempt to try and slow down the execution to the point where a
full-debug kernel can beat the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15 10:58:14 +01:00
Chris Wilson
082fb26ce9 igt/gem_exec_nop: Correct %3.f typo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-15 10:58:14 +01:00
Chris Wilson
7bd4f918c4 igt/gem_exec_nop: Explain the parallel execution assertion
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-14 17:03:59 +01:00
Tomeu Vizoso
f4718c2b6c tests: Open any driver
For those tests that now pass on drivers other than i915, call
drm_open_driver_master with DRIVER_ANY.

Also do so from igt_enable_connectors.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
17a5d7168d kms_addfb_basic: Get intel gen from within subtest
Because determining the Intel GFX generation requires a call to
DRM_IOCTL_I915_GETPARAM, move the code that requires it to a subtest
that can be skipped on drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
6694b6a669 kms_addfb_basic: Move calls to gem_set_tiling to the subtests
So they don't cause unrelated subtests to be skipped when testing
drivers other than i915.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
b2671e8e70 kms_addfb_basic: Split tiling_tests off
Move tests requiring tiled BOs to the end so they don't cause unrelated
subtests to be skipped when testing drivers with only dumb buffer
support.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
c94a828f15 kms_addfb_basic: move tiling functionality into each subtest
Because calls to gem_set_tiling will cause the subtest to be skipped on
drivers other than i915, move them to each subtest that needs them so
the other subtests aren't skipped as well.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
decbf5a3b1 kms_addfb_basic: call igt_create_bo_with_dimensions
Many tests can do their work on drivers other than i915 and even with
just dumb buffers, so call igt_create_bo_with_dimensions instead of
gem_create which will paper out the differences and call the proper
ioctls or cause the subtest to be skipped if that's not possible.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Tomeu Vizoso
dc84e7d6ad lib: Add wrapper for DRM_IOCTL_MODE_CREATE_DUMB
In order to test drivers that don't have support for proper buffer
objects, add a wrapper for creating dumb buffer objects that will be
called from the lib code for those subtests that don't need to care.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-14 13:54:24 +01:00
Chris Wilson
e609955067 igt/gem_ctx_create: Broaden per-engine testing
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-14 10:25:59 +01:00
Chris Wilson
3076951698 igt/gem_exec_create: Add a "leak" test
Don't close the objects, but just mark them as unneded.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-12 16:53:09 +01:00
Chris Wilson
539abffc3e igt: Add a basic test to stress allocation of batches
Run for 20s and don't expect to crash from memory exhaustion or sillies.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-12 13:15:50 +01:00
Peter Antoine
8af67d1980 test/gem_mocs_settings: Testing MOCS register settings
The MOCS registers were added in Gen9 and define the caching policy.
The registers are split into two sets. The first set controls the
EDRAM policy and have a set for each engine, the second set controls
the L3 policy. The two sets use the same index.

The RCS registers and the L3CC registers are stored in the RCS context.

The test checks that the registers are correct by checking the values by
directly reading them via MMIO, then again it tests them by reading them
from within a batch buffer. RCS engine is tested last as it programs the
registers via a batch buffer and this will invalidate the test for
workloads that don't use the render ring or don't run a render batch
first.

v2: Reorganised the structure.
    Added more tests. (Chris Wilson)
v3: Fixed a few bugs. (Chris Wilson)
v4: More Tidy-ups.    (Chris Wilson)
    SKL does does not have a snoop bit. (Peter Antoine)

Signed-off-by: Peter Antoine <peter.antoine@intel.com>
2016-04-12 10:45:49 +01:00
Chris Wilson
d6a85f042c igt/gem_busy: fix compaction of multiple store commands
Missed increment of the batch offset between commands.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-11 12:53:30 +01:00