summaryrefslogtreecommitdiff
path: root/tests/gem_ctx_switch.c
AgeCommit message (Collapse)Author
2018-03-23igt/gem_ctx_switch: Measure qlen for timing loopsChris Wilson
Some platforms may execute the heavy workload very slowly, such that using a batch of 1024 takes tens of seconds and immediately overrunning the 5s timeout on a pass. Added up over a few dozen passes, this turns a 120 second test into 10 minutes. Counter this by doing a warmup loop to estimate the appropriate queue len for timing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-03-02igt/gem_ctx_switch: Exercise all engines at onceChris Wilson
Just a small variant to apply a continuous context-switch load to all engines. v2: Adapt to for_each_physical_engine() and sane gem_context_create() Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-02-21igt/gem_ctx_switch: Do a warmup pass over all contextsChris Wilson
Ensure that we always use every context at least once before we start running the stress-test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-02-07lib: Move __gem_context_create to common ioctl wrapper library.Antonio Argenziano
This patch adds a context creation ioctl wrapper that returns the error for the caller to consume. Multiple tests that implemented this already, have been changed to use the new library function. v2: - Add gem_require_contexts() to check for contexts support (Chris) v3: - Add gem_has_contexts to check for contexts support and change gem_require_contexts to skip if contests support is not available. (Chris) v4: - Cosmetic changes and use lib function in gem_ctx_create where possible. (Michal) v5: - Use gem_contexts_require() in tests and fixtures. (Chris) Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiarski@intel.com> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-18tests: Clean up igt_skip_on_simulation() usesArkadiusz Hiler
General update to reflect current state of things. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-07-06Revert "igt: Remove default from the engine list"Chris Wilson
This reverts commit d7a0b61450797a3d6644c65aebf75c2a90da1a15.
2017-07-06igt: Remove default from the engine listTvrtko Ursulin
Default is not an engine but an ABI alias for RCS. Remove it from the engine list to eliminate redundant subtests and test passes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com>
2017-06-29igt/gem_ctx_switch: Actually force the context-switchChris Wilson
The intent is that during interruptible runs we always force a relocation between batch. This requires us to set an invalid presumed_offset. 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-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-09-08igt/gem_ctx_switch: Increase execution weightChris Wilson
Add a heavier batch of (1M nops) in order to stress a context switch onto a busy engine. (The immediate goal is try and fill the GuC workqueue, but it seems like the lightweight test was enough anyway, as well as gem_exec_nop.) 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-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-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-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-03-26igt/gem_ctx_switch: Add basic test for context switchingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>