summaryrefslogtreecommitdiff
path: root/tests/gem_evict_everything.c
AgeCommit message (Collapse)Author
2017-09-11igt/gem_evict_(alignment,everything): Limit to low 4GChris Wilson
These tests do not tell the kernel they can use the upper 48bits of aperture space, and cause eviction on the low 4G just as effectively exercising the evict code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@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-01-02igt: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-30igt/gem_userptr_blits: Tidy up the debug spamChris Wilson
igt_subtest_group { /* to the request */ } Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97934
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-05-13tests/gem_evict_everything: use uint64_t in subtest paramsMika Kuoppala
Use large enough datatype so that we get the accurate mem requirements and thus skips on 48bit ppgtt. References: https://bugs.freedesktop.org/show_bug.cgi?id=94146 Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-01-25Promote eviction memory sizes and buffer counts to uint64_tChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=93849 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-04lib: igt_fork_hang_helper must be run in fixturesDaniel Vetter
Because it opens an intel-specific drm fd. Fixes crashes when running igt on no-intel. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-10-12Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}()Ville Syrjälä
gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with it. Mostly done with coccinelle, with some manual help: @@ identifier I; expression E1, E2, E3, E4, E5, E6; @@ ( - I = __gem_mmap__gtt(E1, E2, E3, E4); + I = gem_mmap__gtt(E1, E2, E3, E4); ... - igt_assert(I); | - I = __gem_mmap__cpu(E1, E2, E3, E4, E5); + I = gem_mmap__cpu(E1, E2, E3, E4, E5); ... - igt_assert(I); | - I = __gem_mmap__wc(E1, E2, E3, E4, E5); + I = gem_mmap__wc(E1, E2, E3, E4, E5); ... - igt_assert(I); ) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-10-09Make gem_mmap__{cpu,gtt,wc}() assert on failureVille Syrjälä
Rename the current gem_mmap__{cpu,gtt,wc}() functions into __gem_mmap__{cpu,gtt,wc}(), and add back wrappers with the original name that assert that the pointer is valid. Most callers will expect a valid pointer and shouldn't have to bother with failures. To avoid changing anything (yet), sed 's/gem_mmap__/__gem_mmap__/g' over the entire codebase. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-29igt/gem_evict_everything: Use mlock to reduce available memoryChris Wilson
The idea here is to check what happens when a large process requests memory from us - we create and utilize a bunch of surfaces then have to relinquish some but continue using the whole working set (so as to force reloads). 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-01-07igt/gem_evict_(alignment|everything): contend with GPU hangsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-11-17lib/os: Push simulation test down into intel_require_memoryDaniel Vetter
This has the upside that we'll never forget to add it to thrashing tests. But we'll also never miss to move it when adding basic functionality tests to existing binaries. Chris already started this refining work in e.g. commit d77eda6614a1955717f224be023dedf74eb7735d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Nov 14 07:45:40 2014 +0000 igt/gem_linear_blits: Require that we do the full test by moving igt_skip_on_simulation into subtests. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17lib/os: Pust igt_require into memory check functionDaniel Vetter
More in line with the usual igt pattern and simplifies the code - every called just wrapped it in igt_require. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-04ioctl_wrappers: Pass in offset to CPU mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-03igt/gem_evict_everything: Move assertionChris Wilson
If we move the assertion from out of the callback, we can get a much more useful error message. References: https://bugs.freedesktop.org/show_bug.cgi?id=79573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-28Factor in kernel object overhead when checking available memory for testsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-02-04tests/gem_evict_everything: Factor out eviction logicTvrtko Ursulin
In preparation for userptr test we move the eviction logic into a common file so it can be used from both test cases. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-13gem_evict_*: Fix batch lengths, broken on gen8 integrationBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07gem_evict_everything: Fix broken blit generalizationBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06tests/bdw: gem_evict_*Ben Widawsky
support gen8 style blits Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
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-10-09gem_evict_*: Use iterator for blit batchBen Widawsky
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-30tests/gem_evict_everything: tune down forked subtestsDaniel Vetter
On new machines with gobloads of memory and cpu cores, but slow swap on spinning rust we need to limit the runtime a bit for sanity. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03lib/drmtest: include sys/mman.h from drmtest.hDaniel Vetter
We need it for mmapping to get at PROT_READ|WRITE anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29tests/gem_evict_everything: add swapping and forked subtestsDaniel Vetter
Much better at hitting the list corruption here on my machines than what we have thus far. Note that somehow I just can't reproduce the bug any more. No idea why. But I guess it's time to simply push this pile out. v2: Limit threads and rounds to something reasonable. v3: Use igt_permute_array to avoid EINVAL due to duplicated bo. v4: - Add a variant of the forked tests with multiple drm fds. - Tune the swapped forked tests a bit to complete in a reasonable amount of time. v5: Add some memory pressure from the cpu by using cpu mmaps (which directly hit shmem, so bypass gem completely). Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29tests/gem_evict_*: Fix leak in copyDaniel Vetter
This turned out to be the reason one one of my tests was hitting the list corruption bug - we need a good deal more memory pressure. So I'll now add a new testcase for that. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-23tests/gem_evict_*: Add interruptible modesDaniel Vetter
Also I've stumbled over igt_fixture again. Somehow gcc loves to wreak havoc with stack variables set up in igt_fixtures ... Duct-tape in the form of moving fd out to global scope applied. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-20gem_evict_everything: Fix the error code checking after drmIoctlChris Wilson
drmIoctl doesn't return the errno, so look it up after an error. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20tests: Add gem_evict_everythingChris Wilson
Exercise the eviction logic. This is just a naive test to ensure that we can evict old buffers to accommodate new batches, and in the process trigger the evict everything logic. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>