summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_schedule.c
AgeCommit message (Collapse)Author
2019-04-09i915/gem_exec_schedule: Trick semaphores into a GPU hangChris Wilson
If we have two tasks running on xcs0 and xcs1 independently, but who queue subsequent work onto rcs, we may insert semaphores before the rcs work and pick unwisely which task to run first. To maximise throughput, we want to run on rcs whichever task is ready first. Conversely, if we pick wrongly that can be used to trigger a GPU hang with unaware userspace. 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>
2019-04-01i915/gem_exec_schedule: Verify that using HW semaphores doesn't blockChris Wilson
We may use HW semaphores to schedule nearly-ready work such that they are already spinning on the GPU waiting for the completion on another engine. However, we don't want for that spinning task to actually block any real work should it be scheduled. v2: No typeof autos v3: Don't cheat, check gen8 as well 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>
2019-03-26i915/gem_exec_schedule: Measure semaphore power consumptionChris Wilson
How much energy does spinning on a semaphore consume relative to plain old spinning? Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2019-02-19i915/gem_exec_schedule: Switch back to gem_set_domain()Chris Wilson
The write hazard lies extend also to the cache-dirty tracking; as we purposefully do not tell the kernel we are writing to the bo, it fails to note the CPU cache as dirty and so the gem_read() may not sufficiently flush the caches prior to reading back from the GPU. 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>
2019-02-15tests/i915/gem_exec_schedule.c: Switch to gem_sync and gem_readAntonio Argenziano
use IOCTLs gem_read for reading and, gem_sync to wait on a batch, this will help testing platforms that might not expose gtt mapping. v2: - use a local helper for reading from BOs. (Chris) - Always sync before reading. (Chris) v3: - Better helper naming. (Chris) - Start read from actual offset. (Chris) v4: - Always use byte size in helper. (Chris) v5: - Fix byte<->count conversion. (Chris) 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>
2019-02-08i915/gem_exec_scheduler: Disable alarm before exiting childChris Wilson
Still the blighted Starting subtest: pi-ringfull-bsd child 0 died with signal 14, Alarm clock Subtest pi-ringfull-bsd: FAIL (0.133s) So let's make sure our timer cannot fire later on during exit. References https://bugs.freedesktop.org/show_bug.cgi?id=109584 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2019-02-08i915/gem_exec_schedule: Rebuild signal handler in childChris Wilson
Make sure that the SIGARLM handler is captured so that we don't accidentally shoot ourselves in the foot instead of merely waking up the execbuf. The test is hitting child 0 died with signal 14, Alarm clock when we expect it to be hitting the inherited signal handler across the fork. Which is odd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-10-23tests: Introduce i915 directoryArkadiusz Hiler
We can already move all the tests with distinct prefixes: gem_, gen3_ and i915_. pm_ and drv_ tests will follow in batches, so we can do the adjustments in the reporting/filtering layer of the CI system. v2: Fix test-list.txt generation with meson v3: Fix docs build (Petri) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Tested-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>