summaryrefslogtreecommitdiff
path: root/lib/i915/gem_ring.c
AgeCommit message (Collapse)Author
2018-07-13lib/gt: Make use of dummyload library to create recursive batchAntonio Argenziano
An hanging batch is nothing more than a spinning batch that never gets stopped, so re-use the routines implemented in dummyload.c. v2: Let caller decide spin loop size v3: Only use loose loops for hangs (Chris) v4: No requires v5: Free the spinner v6: Chamelium exists. Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> #v3 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-05-31lib: Double check ring measurementChris Wilson
Check twice for the signal interrupting the execbuf, because the real world is messy. References: https://bugs.freedesktop.org/show_bug.cgi?id=106695 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-05-31lib: Align ring measurement to timerChris Wilson
After hitting the SIGINT from execbuf, wait until the next timer signal before trying again. This aligns the start of the ioctl to the timer, hopefully maximising the amount of time we have for processing before the next signal -- trying to prevent the case where we are scheduled out in the middle of processing and so hit the timer signal too early. References: https://bugs.freedesktop.org/show_bug.cgi?id=106695 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
2018-05-31lib: Assert that we do manage to submit at least one batch when measuringChris Wilson
As we measure the ring size, we never expect to find we can not submit no batches at all. Assert against the unexpected. 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-03-22igt/gem_measure_ring_size_inflight: Measure smallest inflight ring sizeAntonio Argenziano
Some tests measure the render's ring size but are actually meant to measure the smallest across all engines. This patch adds measuring the smallest size in gem_measure_ring_size_inflight() given the appropriate parameter. v2: - Only expose high level API. (Chris) v3: - Use ALL_ENGINES macro. 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-03-07Bump measure_ring_size() timer intervalChris Wilson
It appears that waiting for a 100us period whereby we are unable to submit another batch and proclaim the ring full, may have the false positive where the scheduler intervenes and we are signalled twice before having slept on ring space. Increasing the interval reduces the likelihood of the scheduler stealing the cpu from us, but does not eliminate it. Fortuitously it appears to be a rare false positive. For the library routine, we can fork a RT process but that seems a bit overkill! References: https://bugs.freedesktop.org/show_bug.cgi?id=105343 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-23lib/igt_gt: add intel_measure_ring_sizeDaniele Ceraolo Spurio
The logic to measure the ring size is replicated almost identically in several tests. Adding it as a common function will make the code cleaner. The tests are updated in follow up patches. v2: - Move into a new file: 'gem_ring'. (Chris) v3: - Rename ring measure function. (Chris) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>