summaryrefslogtreecommitdiff
path: root/tests/gem_concurrent_blit.c
AgeCommit message (Collapse)Author
2015-04-02tests/gem_concurrent.c: rename to gem_concurrent_allTim Gore
Recent patch #7763349a9a87.. renamed gem_concurrent_blit.c to gem_concurrent.c and then added entries to Makefile.am to make two identical executeables (but with different names) from this source file. This executeable changes its behaviour based on argv[0]. But, this has broken the Android build, which does not use autotools. This patch instead renames the source file to match the name of one executable (gem_concurrent_all.c) and creates a second source file which simply #includes the first. The Makefile.am entries are also removed. This restores the simple test.c -> test executeable relationship seen in the rest of IGT and allows the Android build system to work without parsing Makfile.am or having to incorporate a special workaround for this test. Signed-off-by: Tim Gore <tim.gore@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26igt/gem_concurrent_blit: Separate out the combinatorial explosionChris Wilson
Apparently nobody else likes testing and debugging GEM coherency issues. However, this also means that QA is skipping these vital tests. Split out a set of canaries into igt/gem_concurrent_blit and keep the rest in igt/gem_concurrent_all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19igt/gem_concurrent_blit: Test copying over itselfChris Wilson
Suggested by Lionel Landwerlin as a means to emulate video decode workloads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17igt/gem_concurrent_blt: Test overwrite source used for read-read optimisationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17igt/gem_concurrent_blit: Exercise concurrent readsChris Wilson
Since we are considering implementing read-read optimisations for mixed engine workloads, make sure that we at least have a few tests that check for coherency when doing so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17igt/gem_concurrent_blit: Move buffer allocation after requiresChris Wilson
The choice is to either move the igt_require from the buffer allocation (and allow the allocation to fail) inside the igt_fixture, or move the buffer allocation to the subtest. Moving it to the subtest has the advantage of ensuring that every test has the same initial state (no chance of leaking state across tests) and speeding up running a single subtest. Note this is necessary in order to run igt/gem_concurrent_blit on older kernels, otherwise the requirement for mmap(wc) causes us to skip the majority of tests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-13lib/igt_gt: Document and consolidateDaniel Vetter
Also move forcewake and stop_rings code from igt_debugfs to igt_gt since it fits better. And move the hang injection fork helpers from igt_aux to igt_gt, too. Also push the intel_gen call into igt_hang_ring while at it. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13tests: Align subtest with naming conventionDaniel Vetter
Yeah, historically grown but we should try to be somewhat consistent. It helps with filtering testcases. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/ioctl: gem_ prefix for igt_require_mmap_wcDaniel Vetter
We stick to the overall prefix even for magic require functions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13lib/gt: api polish for igt_can_hang_ringDaniel Vetter
Align with common igt library style: - Push the igt_require into the function. - Push the intel_gen into the function. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-22tests/gem_concurrent_blit: Fix indentDaniel Vetter
Thrown up my brain's parser for a moment ;-) Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-22tests/gem_concurrent_blt: Adjust subtest namingDaniel Vetter
Our tooling doesn't cope with () in the testnames (piglit becomes all confused apparently) and the naming convention says to use "blt" and "render". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88220 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88349 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-01-07igt/gem_concurrent_blit: Inject hangs before verifying contentsChris Wilson
After setting up the copy operations, add a hanging batch. This should mean that we complete the copy and the compare then races against the GEM reset. Hopefully, this will catch driver bugs where the target object is no longer accessible after the hang. Note: hang injection is disabled until the required kernel interface is completed. But there are useful additional tests here... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06igt/gem_concurrent_blit: Exercise wc mappingsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-04tests: add more test descriptionsThomas Wood
Add more test descriptions based on exiting comments. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-09-26igt/gem_concurrent_blit: Only read back a few GTT valuesChris Wilson
Due to the nature of the test, we can be reasonably sure that it is either all copied or not. So we can sacrificing testing the entire buffer for the expected value in order to speed up the test by only testing along the diagonal. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84354 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-09-03igt/gem_concurrent_blit: Move igt_require() out of childrenChris Wilson
Otherwise the test infrastructure throws a fit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83420 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-31igt/gem_concurrent_blit: Use the preallocated dummy bo for temporary copiesChris Wilson
Use the existing allocation, saves having to make fresh allocations in the innermost loop - trimming code and potential failure paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29igt/gem_concurrent_blit: Apply some fence pressure as wellChris Wilson
As before, we also want to race against access through the fence registers. This overlaps slightly with gem_set_tiling_vs_blt, but the different access pattern should make it useful. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29igt/gem_concurrent_blit: Add ring race checksChris Wilson
Similar to the previous commit, we also want to check that every pipeline is serialised correctly. This extends the test to include render copies as well as blits. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-08-29igt/gem_concurrent_blit: Add GPU-vs-GPU checksChris Wilson
In future, we may allow reordering of GPU batches. This implements a simple race detector by extending the current CPU-vs-GPU checks. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14tests: sprinkle igt loggingDaniel Vetter
All the cases that simply dump some debug information and couldn't be converted to some of the fancier macros. Some information output removed when it's redundant with the subtest status. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-23lib: extract igt_aux.[hc]Daniel Vetter
And shovel all the various helpers in there. Also move igt_set_vt_graphics_mode to igt_kms.h since the function is implemented in igt_kms.c. And it fits better. I kinda missed this in the prep work. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: rename intel_gpu_tools.h to intel_io.hDaniel Vetter
With the header cleanup we can now give this header a suitable name, since it now really only contains register access and other I/O functions and assorted definitions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22lib: unnecessary header removal for drmtest.h, part 1Daniel Vetter
Brought a few missing headers to light in ioctl_wrappers.h, too. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13lib: switch intel_copy_bo to directly take a sizeDaniel Vetter
Instead of a width/height combination. Since I've been lazy with the math this now only accepts page-aligned copy operations, but that's all we need really. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-26igt/gem_concurrent_blit: Scale resource usage to RAM correctlyChris Wilson
Note that we use twice the number of buffers, and so we need to restrict num_buffers appropriately to fit within RAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03test/gem_concurrent_bltDaniel Vetter
Limit working set size also with available ram. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01lib: add igt_main macroDaniel Vetter
In the past new testcases with subtest often forgot to add the call to igt_exit at the end of their main() function. That is now caught with a bit more obnoxious asserts, but it's still a nuissance. This little igt_main macro takes care of that (and also of calling the subtest machinery initialization code correctly). If no one objects I'll roll this out for all the simple cases (i.e. those tests that don't have additional argv parsing on top of the subtest machinery). v2: Roll it out across the board. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-02test/gem_concurrent_blt: remove hack for testing igt_forkDaniel Vetter
Oops, this shouldn't have been committed ... Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68830 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29lib/drmtest: extract igt_fork from gem_concurrent_bltDaniel Vetter
Making sure that we correctly collect the exit codes from all children is a bit a hassle. So add another magic igt codeblock for easy forking and joining. Note that children are (currently at least) not allowed to call igt_skip. Add an assert to enforce this. v2: - Properly propagate the exit code. - Fix the segfault. - Add a child int and num_children paramter to the magic codeblock as suggested by Chris Wilson. - Don't dump noise into stdout when a child thread fails, the parent will do that for us already. v3: Now with some docs. v4: Fixup igt_waitchildren to properly reset state so it can be used again. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26Revert "tests/gem_concurrent_blit: Fix segmentation fault"Daniel Vetter
This reverts commit 912a7d855600aadb937517ec5bab26bfd9b8953d. Now fixed for real! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-20tests/gem_concurrent_blit: Fix segmentation faultDaniel Vetter
Apparently the simple changes introduced in commit 78865847f9fae7e590960f9836f2ec8b611a190e Author: Daniel Vetter <daniel.vetter@ffwll.ch> AuthorDate: Mon Aug 19 07:23:49 2013 +0200 Commit: Daniel Vetter <daniel.vetter@ffwll.ch> CommitDate: Mon Aug 19 08:09:25 2013 +0200 lib/drmtest: skip fixtures after an igt_skip pushed the stack space requirement for run_modes over some magic limit (I guess where the strack grow logic starts to fail, but I didn't check). Fix this by moving the data into .bss. Also add some asserts to check that fixtures aren't abused while at it (i.e. the useful parts of my debug printf/assert craze). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68299 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-16gem_concurrent_blit: Purge the child bufmgr's cacheChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16gem_concurrent_blit: Fix the leak from the children.Chris Wilson
As the children use the parent's fd, the kernel only has a single filp for everyone. Therefore we cannot rely on the process termination reaping the buffers we allocate for the children. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16gem_concurrent_blit: Share total num_buffers between all childrenChris Wilson
Apparently not all machines have more than 4GiB of RAM available. Spoilsports. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-14tests: Introduce igt_fixtureDaniel Vetter
Just a tiny wrapper to protect global test setup/teardown code when just listing subtests. Rolling this out over all tests with subtests should allow us to generate the testlist with piglit as an unpriviledged user on a non-intel system. The aim here is to make our QA team happy who currently suffers from this. Even more so for the prime tests since you need a system with intel _and_ nouveau gpus to just be able to list tests. Exemplary conversion with gem_concurrent_blt.c Fixture is the same name other test suites like googletest use for setup/teardown code used by multiple tests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests: use igt_exit() consistently with subtestsDaniel Vetter
This is mostly important to get the SKIP reporting right, but I've found a few stragglers that wanted to get converted over to the igt result reporting completely. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests/gem_concurrent_blt: extract run wrappersDaniel Vetter
Functional programming ftw! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests/gem_concurrent_blt: use the test helpers in the forked testsDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests/gem_concurrent_blt: refactor basic run modes a bitDaniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14tests: merge gem_*_concurrent_blt togetherDaniel Vetter
Too much copy&pasting isn't good. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>