summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2016-05-12lib/igt_aux: Polish docs for igt_timeoutDaniel Vetter
Add docs, rename parameter and rename the macro to igt_do_timeout to make it clear it works like a loop. v2: Rename instead to igt_until_timeout (Chris). Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-05-12lib/igt_aux: Polish docs for igt_interruptibleDaniel Vetter
- Give __ prefix to internal funcstion and structs, only igt_interruptible is used by tests. - Move docs to igt_interruptible and adjust. - Explain more clearly how the timeout is getting doubled each iteration until no more interruptions happen. Also rename the argument to give it a more meaningful name in the docs. - Link from other functions to this one for cross-referencing. - Rename to igt_do_interruptible to make it clearer it's a loop, inspired by do {} while () loops. v2: Rename instead to igt_while_interruptible and fix typos (Chris). And add gtk-doc for igt_ioctl, too. Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2016-05-11benchmarks/, overlay/, demos/, tools/, tests/: Add optional Werror.marius vlad
v2: Initially added Werror by default. Make it optional so it doesn't break android build and (potential) distros maintaing the package (Hinted by Damien Lespiau). --enable-werror will enable -Werror compiler flag. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-10tests/{gem_ctx_switch, gem_exec_create}: Fix shadow declaration of child ↵marius vlad
variable. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-09tests/prime_mmap_kms: Fix white-space.Marius Vlad
Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-09prime_mmap_kms: show case dma-buf new API and processes restrictionsTiago Vignatti
dma-buf new API consists of: - mmap(dma_buf_fd, ...): the ability to map a dma-buf file-descriptor of a graphics buffer to the userspace, and more importantly, to actually write on the mapped pointer (which was not possible before). It’s worth noting that the Direct Rendering Manager (DRM) and the hardware driver implementation are fundamentally important to safely export the graphics handle to be mapped. - ioctl(dma_buf_fd, DMA_BUF_IOCTL_SYNC, &args): cache coherency management in cases where the CPU and GPU devices are being accessed through dma-buf at the same time. Coherency markers, which forward directly to existing dma-buf device drivers vfunc hooks, are exposed to the userspace through the DMA_BUF_IOCTL_SYNC ioctl and have to be used before and after the mapped area is accessed. This is fundamentally important in hardware architectures where the graphics engine and the CPU cores don't share caches but also important in other type of hardware where the memory hierarchy is (most of the time) coherent. More details can be found in this patch set: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c11e391da2a8fe973c3c2398452000bed505851e v2: use uint32_t for color type, increment the variable and add --interactive-debug=paint v3: use igt_display_commit() to mode set the crtc so the rectangle is shown painted; also added Testcase description on the beginning of the file. v4: remove crtc actually which seems superfluous; add a igt_skip_on in case support for dma-buf mmap is nonexistent. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-09igt/gem_exec_parse: Simple exercise for MI_LOAD_REGISTER_REGChris Wilson
Command parser version 7 introduces the ability to copy between regsiters from the Haswell RCS with MI_LOAD_REGISTER_REG. This provides a quick smoketest of that ability. v2: Add some negative tests as well Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-07igt: Add a few more forked variants of basic testsChris Wilson
Check contention for context and object creation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-06tests/kms_addfb_basic: Move tiling tests into their own groupsTomeu Vizoso
So those subtests that require tiling don't cause unrelated subtests to be skipped. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2016-05-06igt/gem_exec_flush: Add some commentary about clflush testingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-06igt/gem_exec_flush: Flush before each useChris Wilson
After we inspect map[i], we must flush again before checking map[i] for the xor pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-06igt/gem_exec_flush: Add a WC mmapping of the target bufferChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-06igt/gem_exec_flush: Test cacheline invalidation before execbufChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-06igt/gem_exec_flush: Restrict BAT batch testingChris Wilson
Only do one mode of batch writing for BAT, and hope that is sufficient to route out all the coherency problems when doing the cmdparser and when not. We still have the full set for non-BAT, just less of a smokescreen. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-04igt/gem_exec_flush: Halve the number of BAT tests, but double their runtimeChris Wilson
On the CI machines, the coherency tests are flip-flopping on byt/bsw. Undesirable as they should always fail (until we have a good w/a). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-04igt/gem_exec_flush: Also check flushing before the cmdparserChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-04tests/kms_plane: Skip the test when configuration couldn't be appliedFeceoru, Gabriel
This could happen when the selected pipe cannot be used with the connected port due do HW constrains. v2: Apply review comment (Marius) bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86763 Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-04tests/kms_plane: Skip on no connected outputsFeceoru, Gabriel
When no display is connected all kms_plane subtests pass although no testing is done. Change it by reporting the subtests as skipped. Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03igt/gem_exec_flush: Give even batch write a unique valueChris Wilson
One property lost in the expansion for various coherency checks was ensuring that every time we overwrote the batch it had a unique value (to ensure that the GPU was seeing the latest value). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-03igt/gem_exec_flush: Stress a few more synchronisation paths for execbufChris Wilson
Look at handling of multiple batches within the buffer and avoiding as much synchronisation as possible. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-03kms_panel_fitting: Enable connectors with "scaling mode" property set.Robert Foss
Enable testing on all connectors that have the "scaling mode" property set. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93012 Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Enabled test on non-Intel hardware.Robert Foss
Switched from DRIVER_INTEL to DRIVER_ANY to enable test on all hardware. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Switched DRM format to a hardware agnostic alternative.Robert Foss
Changed the DRM format to LOCAL_DRM_FORMAT_MOD_NONE since it is hardware agnostic. Also fixed formatting/tabs. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-used variable.Robert Foss
ref_crc is never assigned or read, and can be safely removed. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-read variable pipe_crc.Robert Foss
pipe_crc in data_t is assigned an allocated memory space and then later free'd. But it is never used for any comparisons. It should therefore be safe to remove pipe_crc and the crc requirement. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: Remove un-read variable.Robert Foss
Remove devid from data_t since it is never read. Also remove one assignment to devid. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03kms_panel_fitting: skips if there's a non-eDP display connected. Fix it.Robert Foss
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93012 Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-05-03tests/kms_sink_crc_basic: clean up assert_color and provide more detailsJani Nikula
We can simply sscanf the crc in one go. Also split up the igt asserts to get better details about what went wrong. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-05-03tests: limit pm_backlight actual brightness tolerance between 0 and maxJani Nikula
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-05-03tests: add context param to pm_backlight testsJani Nikula
We'll be adding more context for the subtests than just the max brightness. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-05-03tests: use igt_assert_lte to verify pm_backlight test resultsJani Nikula
Gives out better diagnostics than just igt_asssert. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2016-05-03igt/gem_exec_flush: Test continuously rewriting the batchChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-03igt/gem_ringfill: Avoid CPU -> GTT -> CPU transitionChris Wilson
Avoid the second pair of full clflushes when setting up the batch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Match gem_set_domain to pointer accessChris Wilson
When using the kernel set-domain cache management, we need to set the domain as appropriate for our pointer access. In this case we access the buffer through a CPU mmap, and so we must request access via the CPU domain. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Immediately repeat the same cachelineChris Wilson
When looking at a pair of GPU writes, where we want to make sure that the clean cacheline is invalidated automatically, we want to reuse that cacheline whilst we know it remains valid (i.e. repeat the test using a new value to the same location). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Move assertions out of interruptible loopsChris Wilson
Since the value in the bo may be altered by the test, we only want to repeat phases of the test to avoid breaking the test itself. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Mark mmap-wc dependencyChris Wilson
Add a requirement for mmap-wc so that failure on older kernels is explained. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Use a cacheline strideChris Wilson
Look at different cachelines on each pass, otherwise each group of 16 flush the same cachline. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Add interruptible testingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-02igt/gem_exec_flush: Add basic set-domain checksChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01igt/gem_exec_flush: For good measure, check pread/pwriteChris Wilson
As a point of comparison, test the pread/pwrite interface as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01igt/gem_exec_flush: Use subtest groups to tidy requirement checkingChris Wilson
We can make the requirement testing and reporting tidier by using igt_subtest_group. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-01igt/gem_exec_flush: Add a read-only variationChris Wilson
Alternate between two values written by the GPU so that we can look for stale cachelines without having to overwrite the value with the CPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-29tests: Add gem_exec_flushChris Wilson
A basic check that the execbuf flushes writes from the batch and that they are coherent afterwards. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-27igt: Add gem_exec_parallelChris Wilson
Attempt to fill buffers using many clients working in parallel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-26tests/gem_close_race: Add igt_fixture block for igt_stop_hang_detector.marius vlad
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-25igt/gem_busy: Avoid BSD emission on gen6Chris Wilson
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-25core_getversion: Only verify major version for i915.Robert Foss
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-25core_getversion: Switched from igt_assert to assert helpers.Robert Foss
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-25tests/gem_busy: Fix passing invalid fd for basic-parallel-* tests.marius vlad
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>