summaryrefslogtreecommitdiff
path: root/tests/gem_exec_reloc.c
AgeCommit message (Collapse)Author
2018-03-20igt: Replace 'all-engines' magic numbers with macroAntonio Argenziano
In interfaces where a parameter allow to select an engine, we usually use '-1' or '~0u' to select all engines. This patch replaces magic numbers with a named constant. Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-23Iterate over physical enginesChris Wilson
We current have a single for_each_engine() iterator which we use to generate both a set of uABI engines and a set of physical engines. Determining what uABI ring-id corresponds to an actual HW engine is tricky, so pull that out to a library function and introduce for_each_physical_engine() for cases where we want to issue requests once on each HW ring (avoiding aliasing issues). v2: Remember can_store_dword for gem_sync v3: Find more open-coded for_each_physical Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-09-07igt/gem_exec_schedule: Basic tests for preemptionChris Wilson
We queue N low priority hanging batches across the engines and check that our high priority write over takes them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: MichaƂ Winiarski <michal.winiarski@intel.com>
2017-05-18lib: Refactor testing for ability to use MI_STORE_DATA_IMMChris Wilson
Rather than have the code in multiple locations, put a copy in lib/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-11igt/gem_exec_reloc: Filter out unavailable addresses for !ppgttChris Wilson
In the old shared GTT modes, some addresses may already be in use and so we cannot pin our objects there. Skip placing objects to those locations for maximum test coverage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-11igt/gem_exec_reloc: Exercise relocations across the full GTT rangeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-13iget/gem_exec_reloc: Fix simulated relocationsChris Wilson
The contract with the kernel is that the presumed_offset matches the value written into the batch. In the case where we were creating a new object to simulate the old being relocation, we were writing some other value into the batch. It just happens that using GGTT read back on !llc was causing the original batch to migrated into the aperture, leaving a hole suitable for the new batch, and the kernel could therefore skip the relocation (causing us to complain). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100674 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-13igt/gem_exec_reloc: Check interactions with WC domainChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-22igt/gem_exec_reloc: Double memory requirementsChris Wilson
Worst case is that the kernel has to copy the entire incoming reloc[], so double the memory requirements. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-02-17igt/gem_exec_reloc: Do basic tests of 4/8-byte aligned reloc.offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-06tests/gem_exec_reloc: Don't call igt_(dis)allow_hang outside fixturesPetri Latvala
gem_exec_reloc --list-subtests breaks otherwise. v2: use igt_subtest_group (Chris) Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-02-04igt/gem_exec_reloc: Check against hangs before relocationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-26igt/gem_exec_reloc: Unify the wc/cpu mmap checks for relocChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-26igt/gem_exec_reloc: Pre-emptive defence against gpu relocationsChris Wilson
If we do relocations on the gpu, then we have to wait for the gpu to finish writing to the buffer before the relocations are complete. 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-11-18igt/gem_exec_reloc: Don't execute an empty object for basic-softpinChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_exec_reloc: Trivial test for softpin ABIChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-09igt/gem_exec_reloc: Reduce being interrupted to a warnChris Wilson
If the relocation is incomplete and we take the slow path, we fill the reloc.presumed_offset with -1. This shouldn't happen for the basic tests, at least not on the most recent kernels, yet can happen in older kernels. Just reduce the failure to a warn. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-07igt/gem_exec_reloc: Check we write the full 64bit relocationChris Wilson
Recently a patch ran successfully through BAT that broke 64bit relocations on a couple of machines. Oops. So lets add a very fast set of tests to check basic relocation handling. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-04-01igt/gem_exec_reloc: Exercise read-only relocation arraysChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-14igt/gem_exec_reloc: Exercise updating relocations of an active objectChris Wilson
Supersedes gem_dummy_reloc_loop. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-19igt/gem_exec_reloc: Check WC mmaps as wellChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28igt: More MI_STORE_DWORD fixes for gen5Chris Wilson
A few other tests I have updated recently to use MI_STORE_DWORD also need the magic bit for gen4/5. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-28tests: Add gem_exec_relocChris Wilson
The first steps towards basic relocation handling. In today's edition, we ask how well does the kernel fare if we pass it relocations via mmappings of our buffer objects. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>