summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-03-10igt: Exercise the shrinkerChris Wilson
Introduce a new fork helper that spawns a process that just repeatedly calls i915_gem_shrink_all() and watch what happens as we try to use objects that have been shrunk. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10igt/gem_ringfill: Measure ringsize for quicker and deterministic testingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10tests/testdisplay: Remove unused SPRITE_COLOR_KEYPetri Latvala
Unused since 99bdf4f0ff3e ("tests/testdisplay: Use cairo helpers to draw to plane") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-03-09igt/gem_exec_parse: add hang detectionChris Wilson
Because byt needs it... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-09igt/evictions: Isolate the mlock check in a separate processChris Wilson
The initial mlock() is to check we can assigned all of memory to ourselves -- without the kernel killing us. Move that check to an isolated process so that we sacrifice the child. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08tests/gem_userptr_blits: subtests for MAP_FIXED mappings of regular BOMichał Winiarski
When the memory backing the userptr object is released by the user, but the BO itself is not closed, it's possible to trigger recursive deadlock caused by operations done on different BO mapped in that region. Testcases are simulating such behaviour by using MAP_FIXED mmap flag. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-03-08igt/gem_userptr_blits: Exercise boundary of GTT mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt: Markup more tests that require GEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt/gem_madvise: Correct expected resultsChris Wilson
Trying to execbuf with a purged object is meant to fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt/gem_eio: Check we succeed in unwedging the driverChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08tests: Add gem_spin_batchMika Kuoppala
Add gem_spin_batch to test that the dummyload infra is working properly. Can be also act as tool to force a single engine to be busy for controlled period of time. v2: plenty of igt-fu improvements (Chris) v3: nesting batches for more utilization, epsilon fun (Chris) v4: clear interrupts on start (Chris) Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-06igt/drv_missed_irq: remove redundant clear of missed interruptsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-01igt/kms_frontbuffer_tracking: Show the crtc index (pipe) not idChris Wilson
The pipe is of particular relevance when checking for FBC/PSR compatibility, and easier to understand than its KMS object id. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-01igt/gem_exec_latency: Measure ring sizeChris Wilson
Measure the ring size and limit the number of our batches to avoid stalling (and livelocks) by waiting upon queued batches. References: https://bugs.freedesktop.org/show_bug.cgi?id=99910 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-28tests/chamelium: Don't sleep so much in basic hpd testsLyude
Now that we can just disable HPD storm detection, there's no need to sleep between each hotplug cycle. Signed-off-by: Lyude <lyude@redhat.com>
2017-02-28lib/igt_debugfs: Add functions/tests for controlling/testing HPD storm logicLyude
Recently we added i915_hpd_storm_ctl into i915's debugfs directory, which allows us to control the thresholds i915 uses for detecting hotplug interrupt storms from userspace, along with the ability to entirely disable them. This adds some helper functions into IGT to enable making use of this feature, along with adding some chamelium tests for it. Signed-off-by: Lyude <lyude@redhat.com>
2017-02-27kms_properties: Ignore CRTC_ID for the legacy caseMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27tests/kms_atomic_transition: Add missing variable declarationDorota Czaplejewicz
Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27kms_atomic_transition: Add test for primary plane togging vs vblank.Maarten Lankhorst
When enabling atomic rmfb a bug was found where vblank waits were timing out. Add a testcase that tests if vblanks work regardless of primary plane visibility. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-23igt/drv_hangman: Fix checking of strcasecmp against expectationMichel Thierry
Comparing strcasecmp against a bool promotes the bool into an integer and not force strcasecmp to be a bool. Since strcasecmp can return negative or positive values for error (not a boolean!) we need to convert into a boolean before comparing against our expectation. Signed-off-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23igt/drv_hangman: Clear the error state by actually writing to sysfsChris Wilson
The call to igt_sysfs_set("") was trying to write the empty string, i.e. 0 bytes and so never made it to the kernel. Use igt_sysfs_write("", 1) instead to send the NUL byte to the error state in order for it to be cleared. Reported-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23igt/gem_exec_latency: Assert the relocations are correctChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt/drv_missed_irq: Enable fault injection!Chris Wilson
Fixes: 4c5ed71fa743 ("igt/drv_missed_irq: Clear pending IRQs before testing") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99909 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22intel-ci: Exercise all basic relocation targetsChris Wilson
There are several possible relocation methods the kernel uses depending upon the placement and caching of the buffers. Lots of different code paths not being covered by BAT - expand the testing to cover them. Even though there are quite a few paths, individually they are each very fast. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-21igt/gem_exec_scheduler: Fix test for context prioritiesChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99893 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-21kms_frontbuffer_tracking: Fix badstride test skipping with atomicAnder Conselvan de Oliveira
In the new atomic reality, the page flip in the end of the badstride test succeeds. That flip is to an fb which has a stride too large to allow FBC to be enabled. Adjust the test expectations accordingly. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2017-02-20intel-ci: Test wait ioctl on a queued requestChris Wilson
Another bug found first in the wild... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-02-20kms_atomic_transition: Initialize pipe_crcs to avoid segfaultBrian Starkey
igt_pipe_crc_new() is skipped for non-Intel devices, but the later calls to collect_crcs_mask() will attempt to retrieve CRC values if the pipe_crcs pointers are non-NULL. Zero-initialise pipe_crcs to avoid accessing garbage pointers on non-Intel devices. Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-02-17igt/gem_exec_reloc: Do basic tests of 4/8-byte aligned reloc.offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-12igt/gem_wait: Expand testing to waits on write fencesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-09tests/drv_suspend: Skip */crc/* in debugfs-readerPetri Latvala
Reading the CRC files in debugfs will never terminate. drv_suspend/debugfs-reader will leave a cat process around which blocks all other access to the device until manually killed if CRC files are not omitted. Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-02-08igt/gem_wait: Inject hangs again for hang-wait-*Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-08igt/gem_wait: Exercise BUG_ON if wait_for_execute times outChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-08kms_flip: Handle EINTR in poll call for -interruptible tests.Maarten Lankhorst
This fixes the following failure in kms_flip: (kms_flip:12099) CRITICAL: Test assertion failure function calibrate_ts, file kms_flip.c:1190: (kms_flip:12099) CRITICAL: Failed assertion: poll(&(struct pollfd){drm_fd, POLLIN}, 1, -1) == 1 (kms_flip:12099) CRITICAL: Last errno: 4, Interrupted system call Stack trace: #0 [__igt_fail_assert+0xf1] #1 [run_test_on_crtc_set.constprop.13+0x18f3] #2 [run_pair+0x31f] #3 [main+0x463] #4 [__libc_start_main+0xf0] #5 [_start+0x29] #6 [<unknown>+0x29] Subtest 2x-plain-flip-ts-check-interruptible failed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99651 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-07kms_frontbuffer_tracking: Fix tests with the new atomic reality.Maarten Lankhorst
Stride change through page flip is now allowed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-07kms_frontbuffer_tracking: Skip tests when stride is too high.Maarten Lankhorst
On a 4k hdmi display the stride might be too high for fbc to be enabled, in this case skip the test entirely. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-07kms_atomic_transition: Only call unprepare_fencing when prepare_fencing is ↵Maarten Lankhorst
called. Else we get a null pointer deref on the other tests. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-06kms_busy: Neuter the hangcheck timer for the modeset-*-pipe tests.Maarten Lankhorst
The hangcheck timer may invoke a gpu reset before we finished waiting. To prevent this, we disable it and re-enable it afterwards. This will make sure that the nonblocking modeset waits for the fb before doing the modeset. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-06tests/gem_exec_reloc: Don't call igt_(dis)allow_hang outside fixturesPetri Latvala
gem_exec_reloc --list-subtests breaks otherwise. v2: use igt_subtest_group (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-02-04igt/gem_exec_reloc: Check against hangs before relocationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04igt: intel_gen(intel_gen()) eekChris Wilson
Painfully obvious afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04igt/gem_sync: Relax gen2 filteringChris Wilson
The most basic sync test uses a nop batch, no stores. This is safe to run on gen2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-04tests/gem_exec_params: add test for exec_fence paramsDaniele Ceraolo Spurio
Added a subtest for invalid FENCE_IN usage, updated invalid-flag subtest and made the rsvd2 test skip when exec fences are available. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-03igt: Skip MI_STORE_DWORD_IMM on gen2Chris Wilson
On gen2 MI_STORE_DWORD_IMM operates on a physical, not virtual, address i.e. we can't use it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-03intel-ci: Minimal exercise of explicit fencingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-02-03kms_atomic_transition: Do not use vblank->reserved.Maarten Lankhorst
I used it for prototyping a patch locally, was never meant to be upstreamed without upstream support. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-03tests/kms_plane_multiple: Test only with maximum number of planesMika Kahola
To be more suitable for BAT testing, let's modify the test such a way that it only uses the maximum number of available planes. This reduces the total number of subtests. v2: Fix broken kms_plane_multiple --list-subtests (Petri) Cc: Petri Latvala <petri.latvala@intel.com> Cc: Robert Foss <robert.foss@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
2017-02-02tests/kms_atomic_transition: add in_fences testsGustavo Padovan
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>
2017-02-02tests/kms_atomic_transition: add out_fences testsRobert Foss
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Brian Starkey <brian.starkey@arm.com>