summaryrefslogtreecommitdiff
path: root/tests/gem_sync.c
AgeCommit message (Collapse)Author
2017-10-19lib/i915: Move submission related helpers to lib/i915/gem_submissionMichał Winiarski
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-17lib/i915: Extract context priority setparam to a helperMichał Winiarski
Another example of something that is used across different tests, and should be moved to lib. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib/i915: Extract helpers for determining scheduler capabilitiesMichał Winiarski
Couple of tests are using either determining scheduler capabilities or pretty printing. Let's move those to helpers in lib. We can also keep the value obtained from getparam static. v2: Break the trend of expanding ioctl_wrappers Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-17lib: Extract helpers for determining submission methodMichał Winiarski
Couple of tests are using either determining submission method, or pretty printing. Let's move those to helpers in lib. v2: s/igt_show/gem_show Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-09-29igt/gem_sync: Sync before starting the clockChris Wilson
Hide the initial setup cost of a new batch by performing it before we start the clock for measuring the execute-wait latency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-09-29igt/gem_sync: Add a preemption testChris Wilson
Check and measure how well we can submit a second high priority task when the engine is already busy with a low priority task and see how long it takes to complete (and wake up the client). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-07-06gem_sync: Add all and store_all subtestsTvrtko Ursulin
Extended versions of the already existing short tests. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Daniel Vetter <daniel.vetter@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-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-04igt/gem_sync: Relax gen2 filteringChris Wilson
The most basic sync test uses a nop batch, no stores. This is safe to run on gen2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-03igt: Skip MI_STORE_DWORD_IMM on gen2Chris Wilson
On gen2 MI_STORE_DWORD_IMM operates on a physical, not virtual, address i.e. we can't use it. 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-10-18igt: Trim timeouts for basic GEM testsChris Wilson
It's a compromise between detecting an unlikely timing error in one test and being able to run a broader selection of tests. I hope this is wise. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-08-23Revert "tests/gem_sync: Skip basic-store-each sub-test on BDW."Chris Wilson
This reverts commit 38f84e30e699451cac6c7b45cd603e67b1287f15.
2016-07-25tests/gem_sync: Skip basic-store-each sub-test on BDW.Marius Vlad
Causes too much noise in CI, so skip it for now. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
2016-07-22lib/sysfs: Provide a convenience function for reading a boolChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-22igt/gem_exec_nop: Display submission mechanismChris Wilson
Useful for confirmation when testing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-06igt/gem_sync: Fix uninitialised variable 'n'Chris Wilson
Not a good day. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-05igt/gem_sync: Fix many_store() for printing out a single engineChris Wilson
The name for a single engine was unset, oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-05igt/gem_sync: Try and race the bottom-halfChris Wilson
In light of a bug in intel_breadcrumbs where we missed the interrupt when a new bottom half was installed and raced with the old bottom half being signaled, try and recreate that race. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-04igt/gem_sync: Extend with store synchronisationChris Wilson
Currently gem_sync exploits read-read optimisation to wait upon multiple rings simultaneously. But at the moment, gem_exec_flush is showing sporadic missed interrupts on bdw/skl and yet gem_sync is not. This is some subtlety in the timing, perhaps caused by the extra write. This set of tests tries to exercise that by using a write batch - which also means we exercise inter-ring synchronisation (like gem_storedw_loop). 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-05-20igt/gem_sync: Drop individual engines from BATChris Wilson
Rely on testing every engine in parallel to detect the most common synchronisation problems ("missed interrupt syndrome") for BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25igt/gem_sync: Add a basic test to wait upon a batch on all ringsChris Wilson
Execute the batch concurrently on all rings and then wait (as opposed to executing a different batch on each engine). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-25igt/gem: Add GPU hang detection to basic testsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-26igt/gem_sync: Enforce a timeout of 20sChris Wilson
The sync test is supposed to complete in 10s. But some bugs cause it to run very, very slowly. As a defence against those, terminate the test if we wait for more than 20s. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-26igt/gem_sync: Test across all rings simultaneouslyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-02-26igt/gem_sync: Add some forked variantsChris Wilson
Repeat the synchronisation test with a few competing processes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27igt/gem_sync: Use common array of ringsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27lib: Share common __gem_execbuf()Chris Wilson
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-22lib: Refactor common detection of missed interruptsChris Wilson
As we have the same function in a few places to read the debugfs/i915_ring_missed_irq file, move it to the core. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-17tests: Add basic gem_sync testChris Wilson
A very basic test of functionality, execute a nop and wait for it to complete. It should be very effective at stimulating the "missed interrupt syndrome" on all devices. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>