summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-12-27kms_cursor_legacy: Run cursor updates only for a quarter of the time.Maarten Lankhorst
Because in the ideal case we currently wait 50% of the time for every frame, on some machines cpu scaling gets in the way when we idle a lot and will cause the machine to throttle to a lower cpu speed. This causes a failure because we may end up missing vblanks. Work around this by only running for 1/4th of the time at max speed, even on low cpu speeds it will be less likely to run into issues then. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-22lib/selftest: Query module parameter for error code.Chris Wilson
"Live" selftesting of i915.ko happens during device probing which eats the error code and does not propagate it back to module loading. Workaround this by writing the error code back to the module parameter and probing it after a "successful" install. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-22kms_cursor_legacy: Reduce runtime of cursor-vs-flip.Maarten Lankhorst
This was running for 150 seconds before, reduce it to 25. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-21kms_cursor_legacy: Make tests less strict.Maarten Lankhorst
Some tests may wait a vblank on master. Instead of failing the tests, allow them to succeed if 1 vblank passed. Also no longer warn if a page flip is missed, change it to info instead. As long as no more than 25% of the vblanks are missed the tests will pass. Also fix nonblocking modeset vs cursor, which needs an array of cursor argument. This was a nice buffer overrun before. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-17lib/sw_sync: Rename sync_fence_create()Chris Wilson
It takes a sw_sync_timeline and returns a fence (it is a factory), so call it sw_sync_timeline_create_fence() for better self-documentation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Indicate that sync_merge() operates and create a sync_fenceChris Wilson
Improvements to self-documentating API that matches the rest of sw_sync. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17lib/sw_sync: Bring sync_wait() API into lineChris Wilson
igt likes to return kernel-esque negative errno where we can, and indicate that we expect to operate on a sync_fence, otherwise it is merely a grandiose poll(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-17tests/perf: Remove duplicate NSEC_PER_SEC defineChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-16igt/drv_selftest: Rename late to live selftestsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-16igt/perf: add i915 perf stream tests for HaswellRobert Bragg
This bumps the libdrm_intel version required to 2.4.74 for the drm_intel_context_get_id api used in these tests. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
2016-12-16igt/gem_exec_parse: generalise test_lri + debug infoRobert Bragg
This further generalises the description passed to test_lri so we only need one loop over the entries with test_lri deducing the exected errno and value based on whether the register is marked as whitelisted and depending on the current command parser version. Each tested register LRI now gets its own subtest like: igt_subtest_f("test-lri-%s", reg_name) The test_lri helper now also double checks that the initial intel_register_write() takes before issuing the LRI. In case of a failure the test_lri helper now uses igt_debug to log the register name, address and value being tested. Signed-off-by: Robert Bragg <robert@sixbynine.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-14lib/debugfs: Support new generic ABI for CRC captureTomeu Vizoso
The kernel has now a new debugfs ABI that can also allow capturing frame CRCs for drivers other than i915. Add alternative codepaths so the new ABI is used if the kernel is recent enough, and fall back to the legacy ABI if not. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2016-12-14igt/kms_atomic: Match CRTC harder for special planesDaniel Stone
Our heuristic for finding planes was previously matching the type, and ensuring that the plane was valid for that CRTC. However, VC4 now has primary/cursor planes which can wander multiple CRTCs, so we could pick a PRIMARY plane which was not the kernel's idea of crtc->primary, causing plane_primary_legacy to fail; ditto for cursor. Make find_plane try harder, by preferring to return planes which are already on the requested CRTC. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busy_unixsocketRobert Foss
Add subtest test_sync_busy_fork which increments the timeline in a forked child process, where the timeline fd has been sent through a UNIX socket. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busy_forkRobert Foss
Add subtest test_sync_busy_fork which increments the timeline in a forked child process. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_merge_invalidRobert Foss
Add subtest test_sync_merge_invalid that tests merging invalid fences. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add igt_require check for sw_sync featureRobert Foss
Make sure that this test is skipped if the sw_sync feature is missing from the host system. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_timeline_closed_signaledRobert Foss
Add subtest test_timeline_closed_signaled that verifies that a signaled fence stays signaled after its timeline has been closed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_timeline_closedRobert Foss
This subtest verifies that the fences of a timeline are not signalled when a timelne is closed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_expired_mergeRafael Antognolli
This test creates an already expired fence, then creates a merged fence out of that expired one (passed twice to the merge operation), and finally closes the merged fence. It shows that if the refcounts are wrong on the original expired fence, it might get freed while still in use. Usually a kernel panick will follow. Signed-off-by: Rafael Antognolli <rafael.antognolli@intel.com> Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_producer_single_consumerRobert Foss
This subtest runs a single consumer thread and multiple producer thread that are synchronized using multiple timelines. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_timeline_waitRobert Foss
This subtest verifies that waiting, timing out on a wait and that counting fences in various states works. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_random_mergeRobert Foss
This subtest verifies that creating many timelines and merging random fences from each timeline with eachother results in merged fences that are fully functional. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_consumer_producerRobert Foss
This test verifies that stressing the kernel by creating multiple consumer/producer threads that wait on a single timeline to be incremented by another conumer/producer thread does not fail. And that the order amongst the threads is maintained. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_multi_consumerRobert Foss
This subtest verifies the access ordering of multiple consumer threads. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_merge_sameRobert Foss
This subtest verifies merging a fence with itself does not fail. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_mergeRobert Foss
Add subtest test_sync_merge that tests merging fences and the validity of the resulting merged fence. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_sync_busyRobert Foss
This subtest verifies that waiting on fences works properly. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_merge_fenceRobert Foss
This subtest verifies that merging two fences works in the simples possible case. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_fence_invalid_timelineRobert Foss
This subtests tests that creating fences on negative timelines fail. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14tests/sw_sync: Add subtest test_alloc_fenceRobert Foss
Add subtest alloc_fence that verifies that it's possible to allocate a fence on a timeline. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-14test/sw_sync: Add sw_sync testRobert Foss
Add initial tests for sw_sync. Signed-off-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-12-08igt_kms: Remove support for drivers with <1 drm_planeLyude
We've had support for universal planes since kernel version 3.15, so there's not really a good reason to try supporting drivers that lack plane support now. As well, the current has_universal_planes logic is broken anyway as it makes the assumption that having display planes always means we have both a primary plane and a cursor plane (this isn't true on radeon/amdgpu and nouveau). So, remove this, and just check for whether or not we have a cursor plane. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-12-08tests/kms_cursor_legacy: Change crc tests to use cursor movement instead of ↵Maarten Lankhorst
cursor hiding This way the tests will pass with the legacy cursor hack. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-12-07tests/kms_plane_multiple: Fix CRC based atomic correctness testMika Kahola
Fixes issues on kms_plane_multiple i-g-t test found when running CI tests v1: - don't use tiling for cursor plane (Ville) - for y/yf tiling check that the platform is at least GEN9 (Ville) Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
2016-12-07igt/drv_selftest: Adapt to mock/late splitChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-06igt/kms_flip: Poll before reading from nonblocking drm_fdChris Wilson
If we run the full testsuite, the drm_fd is set to nonblocking - so we have to explicitly wait using poll rather than rely on a blocking read for the vblank event. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-06igt/kms_flip.c: Fix timings checkDorota Czaplejewicz
Adjust the description and constants in the timing check to match each other. Relax the timing constraint to prevent false positives in vblank interval checking.
2016-12-06igt/kms_setmode.c: Tweak timings check constantsDorota Czaplejewicz
Add explanations of the checks and note the way the constants were derived. Tweak the constants to reflect their purpose better.
2016-12-02tests: Add feature list file for piglit 'summary feature'Feceoru, Gabriel
This is a placeholder for the feature list file. This needs to be filled in by feature owners with the feature name and the corresponding tests regex. Please refer to this piglit commit for more info on this feature. commit f16d011db75b08ceae241e7370599146691340ab Author: Feceoru, Gabriel <gabriel.feceoru@intel.com> Date: Tue Nov 3 17:50:41 2015 +0200 framework: Add support for feature readiness. v2: - Moved the file to tests directory - Replaced the example with a real feature Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
2016-12-02tests/kms_sysfs_edid_timing: Convert sh to C version.Marius Vlad
The debug output for a HSW machine with two connectors (VGA and HDMI): DEBUG: card0-VGA-1: mean.max 12896229,00ns, 12896,23us, 12,90ms, mean.avg 12785055,80ns, 12785,06us, 12,79ms WARNING: card0-VGA-1: probe time exceed 10ms, max=12,90ms, avg=12,79ms DEBUG: card0-HDMI-A-1: mean.max 781433,00ns, 781,43us, 0,78ms, mean.avg 706643,20ns, 706,64us, 0,71ms v4: - do not include the time opening the fd (Chris Wilson) - include output from debug (Chris Wilson) v3: - use igt_mean for accounting (Chris Wilson) - make it Intel-agnostic when searching for connectors (Chris Wilson) v2: - don't read cached values (Chris Wilson) - warn on per connector, and fail per mean (Chris Wilson) These are synthetic: 10ms per connector, and 50ms for all. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2016-12-02tests/drv_module_reload: Convert sh script to C version.Marius Vlad
v5: - reword gem_info to gem_sanitychecks (Chris Wilson) - remove subgroups/subtests for gem_exec_store and gem_sanitycheck (Chris Wilson) v4: - adjust test to make use of lib/igt_kmod - replaced SW_FINISH with SET_CACHEING (Chris Wilson) v3: - fix passing boolean value as flags to igt_kmod_unload(). v2: - embedded gem_alive and gem_exec_store into test (Chris Wilson) - int main() to igt_main (Chris Wilson) - moved tests/gem_alive -> tools/gem_info (Chris Wilson) - added to intel-ci/fast-feedback.testlist (Petri Latvala) - added hda_dynamic_debug() (Petri Latvala) - renamed from tests/drv_module_reload_basic to tests/drv_module_reload (all subtests are basic and have been added to fast-feedback.testlist) Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2016-12-01igt: Add kselftest runner for i915Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01lib/igt_kmod: Adopt igt_kselftests()Chris Wilson
Extract the automagic kselftest runner from tests/drm_mm.c to the new lib/igt_kmod.c Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01lib/igt_gvt: Make use of libkmod helpers and fix reading gvt parameter.Marius Vlad
v2: - use igt_sysfs_get_boolean() to get gvt status (Chris Wilson) - do not hard-fail when i915 module could not be loaded/unloaded (Chris Wilson) Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-12-01igt/kms_busy: Add more information about the state of the boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01igt/kms_flip: Fix set_dpms called with an idle boAbdiel Janulgue
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01Silence a bunch of "const discard" warningsChris Wilson
A few warnings of the form: gem_mmap_gtt.c: In function ‘copy_wc_page’: gem_mmap_gtt.c:480:16: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default] __m128i *S = (const __m128i *)src; are no more. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-29igt/drv_hangman: Promote nsec calc to u64Chris Wilson
100 * 1 billion needs a 64bit intermediate Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-29igt/gem_gtt_speed: Spare clang the embarrassmentChris Wilson
Clang pretends to be GCC and then dies on GCC pragma. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>