summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21igt/kms_pipe_crc_basic: Don't assert on errno after successTomeu Vizoso
If errno contains left overs from previous syscalls, we'll be failing the assert in some successful conditions. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21igt/gem_exec_nop: Sync before measuring total elapsed timeChris Wilson
The systematic error should be lost in the millions of cycles, but better pedagogically correct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21igt/gem_userptr_blits: Allow use of >4GiBChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94609 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21igt/gem_spin_batch: Reduce impact from slow queueingChris Wilson
Subtract the time it takes to do a loop to submit the batch from the dummy load, so in theory each loop takes a constant time (100ms). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-20intel-ci: Add initial generic testlistAbdiel Janulgue
Similar to fast-feedback test list. The point of the generic test list is to gather pass-rate when running generic tests - i.e., tests that don't rely on specific GPUs. Again, this test list is dynamic and will either shrink or grow over time. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com
2017-03-20tests/kms_atomic: test that TEST_ONLY does not clobber stateMika Kahola
We need to make sure that TEST_ONLY really only touches the free-standing state objects and nothing else. Test approach here is the following: - Create a config and submit it with TEST_ONLY. - do dpms off/on cycle with the current config to reconfigure hw - read back all legacy state to make sure none of that is clobbered v2: use ATOMIC_RELAX_NONE instead of CRTC_RELAX_MODE when checking crtc or plane state (Maarten) rename subtest and function that executes this test (Maarten) Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-03-19igt/kms_vblank: Exercise contention of drmWaitVblankChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-17igt/drv_hangman: Setting wedged is serialisedChris Wilson
So we don't need to use an artificial delay. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-17igt/gem_exec_schedule: Never use STORE_DWORD_IMM on SNB bsd engineChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-16igt/gem_userptr_blits: Move assert to callerChris Wilson
Improve the error message by having the caller do the assert Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-15tests/kms_cursor_legacy: make_busy() before get_vblank()Ville Syrjälä
VLV is a sloth and so doing anything extra between the first and last get_vblank() is likely to increase the chance of failing the test. Let's move the make_busy() stuff to happen before the first get_vblank() to reduce the amount of work done there. These tests are still failing quite often on my VLV, but that is mostly caused by igt_kms's tendency to still re-read all the connector properties and whatnot as part of the commit operation. I suspect that fixing that would eliminate most of the spurious failures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-03-15kms_properties: Blacklist legacy link-status connector property.Maarten Lankhorst
This will be fixed by converting all connectors to atomic, but this fails for now. Blacklist it just like crtc_id temporarily. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-03-13igt/kms_pipe_crc_basic: Tighten timings for CRC readbackChris Wilson
The number of vblanks that pass whilst we read back the CRCs is depended upon CPU scheduling -- we may take longer than expected and end up reading more CRCs. Align the start of the loop to a vblank. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100132 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-13igt/kms_pipe_crc_basic: Skip test before hang injectionChris Wilson
If the pipe doesn't exist, don't bother submitting a hanging batch. Do a basic check first before doing a crc read against a hanging batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-13Revert "Always expose IGT subtests for known kernel selftests"Chris Wilson
This reverts commit 7ab5c97924bf971a348ff4a1768da624ba2f564c.
2017-03-13Always expose IGT subtests for known kernel selftestsPetri Latvala
Even when the running kernel does not support selftests, make subtest enumeration list known kselftests. The list is generated using selftest listing headers copied from the kernel. If the running kernel gains new selftest subtests, they are listed even without copying the headers over and rebuilding IGT. v2: Use correct names for the testcases Signed-off-by: Petri Latvala <petri.latvala@intel.com>
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>