summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-07-01igt/prime_busy: Promote the test for dma-buf implicit fences as basicChris Wilson
This is a requirement for interoperability that we fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-29tests: Remove kms_rmfb.cMaarten Lankhorst
Accidentally added as part of another patch. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-29igt_kms: Add modeset support for atomic style commits.Maarten Lankhorst
All pipes are now updated in the loop first, before connectors are read out. The mode_id and active crtc properties are added, and crtc_id for connectors. These are required to do a modeset, and the behavior during atomic commits is changed slightly too. A lot of code will do the following: - Init. - igt_output_set_pipe(output, pipe); - commit. Since legacy setcrtc and atomic commit differ, there are some differences in how we commit pipes and connectors too. For atomic we set output->crtc during igt_output_set_pipe, and use it in atomic commit. This may be set to NULL, in which case the output is disconnected from the crtc. Unlike legacy we won't attempt to bind all connectors to all pipes, only the ones that were explicitly set. As a test, convert kms_rmfb.c Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-29tests/kms_rmfb: Use for_each_pipe_with_valid_output.Maarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-29tests/kms_chv_cursor_fail: Run the tests with fewer steps.Maarten Lankhorst
This reduces the runtime of the tests from ~200s on my 30 fps 4k panel to 10s. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-24igt/kms_cursor_legacy: Check that cursor updates do not stall flipsChris Wilson
A similar expectation as to the current test that flips do not stall cursor updates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-23igt: Add basic framework for GVT-g testingChris Wilson
We don't do anything yet other than try to load the module. Initial sanity checks to come. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Zhi Wang <zhi.a.wang@intel.com>
2016-06-23Silence compiler warnings for expected and handled error conditionsChris Wilson
Silly compiler emitting warnings that just cause people to break code attempting to silence the compiler. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-23igt/vgem_basic: Check multiple clients can open /dev/dri/<vgem>Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22igt/kms_cursor_legacy: Replace synchronous pageflipChris Wilson
Aparently we never supported that mode of operation. Maybe in the future we will, but for now just use the vblank wait to align ourselves with the vblank. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22igt/kms_cursor_legacy: Detect pageflip errorsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22tests/kms_flip: Check that the last vs. current seq/ts are consistentVille Syrjälä
Let's make sure the ts vs. seq difference between the current and last events match. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22tests/kms_flip: Print the expected diff between two eventsVille Syrjälä
To aid in diagnosing failures, print out the expected time difference between the two events. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22tests/kms_flip: Account for diff.tv_secs in jitter checkVille Syrjälä
Include diff.tv_secs in the jitter comparison. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22tests/kms_flip: Use USEC_PER_SECVille Syrjälä
Replace some opencoded numbers with USEC_PER_SEC, and print the usec_diff with 6 decimal digits to make things more consistent. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22tests/kms_flip: Constify some function argumentsVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22tests/kms_flip: Print timestamps in a consistent formVille Syrjälä
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-22igt/kms_cursor_legacy: Add a rudimentary test to detect stalled cursorsChris Wilson
A common problem when trying to unify legacy and atomic is the breaking of existing non-blocking, asynchronous userspace. The most trivial example is a cursor that stalls for a pageflip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22igt/vgem_reload_basic: Do a modprobe dry-run firstChris Wilson
Skip if the vgem module is not present, but still fail if we fail to load it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-22tests/drm_getopt.sh: Make it executable as CI does a copy ofMarius Vlad
tests using executable permission. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-06-21tests/drm_lib.sh: Extract fake getopt options so it can sourced into tests ↵marius vlad
that require it. This should allow tests/vgem_reload_basic to pass check target and it doesn't depend of i915 being present. v2: Do not source drm_lib.sh, only fake getopt parsing option to again access to --list-subtests option (Chris) v3: Forget to place the script in Makefile.sources, otherwise distcheck will not copy it. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> [Chris: Replace exit 1 with exit $IGT_EXIT_FAILURE] CC: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-21igt/gem_close_race: Complete conversion to drm_open_driver()Chris Wilson
commit e63a0681d95a ("tests/gem_close_race: Use drm_open_driver helper") left a few raw open() behind. Eliminate them as well! References: https://bugs.freedesktop.org/show_bug.cgi?id=96605 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-21igt/prime_vgem: Speed up implicit fence failureChris Wilson
Close the batch before asserting so that we don't have to wait for a hang after a failure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20igt/prime_vgem: Insert a WCB flush between distinct mmappingsChris Wilson
Since we use distinct WC addresses for the same page, we need to flush the WCB after the write in order to see it from the other mmaping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20igt/prime_vgem: Add a tight coherency check between vgem/gtt mmapChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20igt/vgem_basic: Exercise opening sysfs/debugfsChris Wilson
For fun, debugfs/.../names currently explodes, so lets capture that and make sure that basic access to debugfs does no harm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-20benchmarks: Add vgem mmap speed testChris Wilson
Primarily to check that we have the WC read/write disparity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-18igt: Add basic exercise of vGEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-17kms_frontbuffer_tracking: properly handle mixing GTT and WC mmapsPaulo Zanoni
The new Kernel behavior is that whenever a buffer has ever been WC mmapped, the GTT mmaps will be treated as CPU operations. Because of this, if we don't issue the dirty_fb IOCTL after doing frontbuffer rendering with the GTT mmaps, FBC will remain disabled. Luckily, the only subtest that does this sort of mix is the multidraw subtest. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-06-17kms_frontbuffer_tracking: recreate the FBs at every subtestPaulo Zanoni
This patch was originally written because of a workaround we were planning to merge. Later we improved the workaround so it wouldn't need this patch anymore. Then later we gave up on the workaround, but decided to go with a plan that would cause GTT mmap writes to invalidate FBC in case the frontbuffer ever had a WC mmap. So now we need the patch again because we don't want a subtest that involves an WC mmap to change the behavior of other unrelated subtests that use GTT mmaps. Even if we don't go with the current planned Kernel patch, merging this should be worth in order to avoid future related problems. v2: New commit message. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-06-17kms_frontbuffer_tracking: prefer the BLT drawing methodPaulo Zanoni
A recent Kernel fix changed the way GTT and WC mmaps behave during frontbuffer drawing. This, added with the fact that GTT mmaps are special cases for PSR, suggests that maybe we should move to BLT drawing in places where we can, in order to simplify things a little bit. v2: New commit message. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2016-06-17igt: Replace drv_missed_irq_hang script with a C-equivalentChris Wilson
In order to control some of the finer detail of detecting when we missed an interrupt, replace the shell script with C. This version submits a hanging batch and uses a child process to unhang it, whilst the parent sleeps. As the child process is prevented from running whilst the parent is alive (as the child is a low priority normal process whereas the parent is a RT process), the child can only unhang the parent after i915_wait_request() has spun up and tried to enable the interrupt. In contrast, the shell script guessed a workload that should take long enough for the i915_spin_request() to miss the completion, but that was not guaranteed. Furthermore, from C we can trigger a missed interrupt on each engine. A minor convenience of the C version is that we don't have to worry about install paths to find the binaries underneath. References: https://bugs.freedesktop.org/show_bug.cgi?id=88437 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-17tests: Push igt_fork/stop_hang_detector into fixturesDaniel Vetter
It access hardware, hence why the simple igt_only_list_subtests() check from igt_fork/stop_signal_helper() isn't enough. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-06-17tests/gem_close_race: Use drm_open_driver helperDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-06-14igt: Add a test case for polling dma-buf fencesChris Wilson
This tests that we are adding our requests to the dma-buf reservation object, both in exclusive (write) and shared (read) mode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-10igt/gem_shrink: Redirect all allocations through GEMChris Wilson
Rewrite calloc() to use a GEM object for its backing storage, so we increase stress on GEM and hopefully reduce the likelihood of an early failure before hitting oom. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-09igt/gem_reset_stats: Add time constraints on hang detectionMika Kuoppala
Make sure that injected hang is detected below time threshold. This ensures that we fail if hang was of no-progress type instead of a stuck engine. v2: use igt_seconds_elapsed() (Chris) 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>
2016-06-09tests/kms_chv_cursor_fail: Remove extra igt_pipe_crc_start.Maarten Lankhorst
There is a extra call to igt_pipe_crc_start that is not matched to any stop. Because of this the exit handler tries to reset the crc source on exit while the pipe disabled. This causes fails with -EIO: (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Test assertion failure function igt_pipe_crc_pipe_off, file igt_debugfs.c:364: (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Failed assertion: write(fd, buf, strlen(buf)) == strlen(buf) (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: Last errno: 5, EIO (kms_chv_cursor_fail:2643) igt-debugfs-CRITICAL: error: -1 != 11 Stack trace: #0 [__igt_fail_assert+0xf1] #1 [igt_pipe_crc_pipe_off+0xe4] #2 [pipe_crc_exit_handler+0x35] #3 [igt_atexit_handler+0x4c] #4 [__libc_secure_getenv+0x112] #5 [exit+0x15] #6 [igt_exit+0xd6] #7 [main+0x1ee] #8 [__libc_start_main+0xf0] #9 [_start+0x29] #10 [<unknown>+0x29] Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-07tests: Add kms_invalid_dotclockVille Syrjälä
Add a test that makes sure every modeset gets rejected by the kernel if the requested dotclock is beyond the hardware capabilities. For now we just test the preferred mode for each connector, should perhaps test them all to be more sure everything is getting rejected. We also skip the test on connectros that have a fixed mode as the kernel will ignore most of the user timings. We should make the kernel more strict I think, to at least check that the user gets roughly the refresh rate they requeted. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-06-07igt/gem_stolen: Check for available stolen memory sizeAnkitprasad Sharma
Check for available stolen memory size before attempting to run the stolen memory tests. This way we make sure that we do not create objects from stolen memory without knowing the available size. This checks if the kernel supports creation of stolen backed objects before doing any operation on stolen backed objects. Also correcting the CREATE_VERSION ioctl number in getparam ioctl, due to kernel changes added in between. v2: Removed size argument for checking stolen memory availability (Tvrtko) Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-07igt/gem_stolen: Fix for no_mmap subtestAnkitprasad Sharma
no_mmap subtest is expected to fail, but calling gem_mmap__cpu will assert the returned value itself, which makes test fail. Replacing gem_mmap__cpu by __gem_mmap__cpu and checking the returned value. Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-07igt/gem_stolen: Verify contents of stolen-backed objects across hibernationAnkitprasad Sharma
This patch verifies if the contents of the stolen backed object were preserved across hibernation. This is to validate kernel changes related to moving stolen-backed objects to shmem on hibernation. v2: Added comment, Use igt_assert_eq() instead of igt_assert(), Made loops more readable (Tvrtko) v3: Corrected assertion (Tvrtko) Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-07igt/kms_cursor_legacy: wrap __builtin_ia32_pause inside cpu_relaxTomeu Vizoso
So that we can add an alternative implementation for the other arches. This is basically what the kernel does. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-06-07tests/core_prop_blob: Add invalid tests to set fb propsDaniel Vetter
There's no properties on fb modeset objects, bug bugs in the kernel when trying to use those ioctls in such an invalid way. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-06-07tests/kms_addfb_basic: Add invalid tests to set fb propsDaniel Vetter
There's no properties on fb modeset objects, bug bugs in the kernel when trying to use those ioctls in such an invalid way. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-06-04igt/kms_cursor_legacy: Add background RT threadsChris Wilson
Saturate the CPUs with background RT threads to soak up any spare CPU not taken by testing threads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-04igt/gem_exec_whisper: Another twist on engine interchangeChris Wilson
Slightly less extreme than switching engines between commands, switch engines between pixels. This helps contrast the request amalgamation in execlists. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-04igt/gem_ctx_thrash: Scale estimated usage by execlists.num_enginesChris Wilson
Since with execlists we use a context per-engine, we consume a lot more space than we were currently estimating. Enough to hit oom on some machines. References: https://bugs.freedesktop.org/show_bug.cgi?id=94145 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-03igt/gem_mmap_gtt: Exercise differing tile sizesChris Wilson
Importantly this verifies that we pick a partial alignment/size suitable for the tile. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-02Mark up a few more execbuf tests with automatic fail for missed-interruptsChris Wilson
Too many interrupts missed being ignored. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>