crosvm/rutabaga_gfx
Dmitry Osipenko 222ca69401 gpu: Support passing guest fences to host
Support passing guest fences to host for waiting by using extended
VIRTIO_GPU_CMD_SUBMIT_3D command that replaces previously unused
padding field with a new 'num_in_fences' field. The in-fence IDs
are prepended to the cmdbuf data. There is new corresponding
VIRTIO_GPU_F_FENCE_PASSING feature flag, it must be supported by
guest in order to activate fence passing on host. There is new
VIRTIO_GPU_FLAG_FENCE_SHAREABLE flag for VIRTIO_GPU_CMD_SUBMIT_3D
command that is set if job's fence is shareable.

Fence passing allows guest to offload dma-fence waiting to host,
removing unnecessary stalls in the GPU pipeline. Guest kernel doesn't
have to stall job submission anymore until all in-fences are signalled
on guest side.

This new feature improves GL/VL interop performance up to 2-3x times
for native contexts. It will also allow to share host GPU fences with
host display subsystem easily for explicit fencing of framebuffer flips
within the host kernel display driver, which is useful for virtio-wl.

TEST=none
BUG=b:253779836
Link: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1138
Change-Id: Ie547614c26ff5f3f75ccf203096e9087827be542
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4679609
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
2023-08-28 16:05:30 +00:00
..
ffi gpu: Support passing guest fences to host 2023-08-28 16:05:30 +00:00
src gpu: Support passing guest fences to host 2023-08-28 16:05:30 +00:00
build.rs rutabaga_gfx: use pkg-config for gfxstream, link statically when possible 2023-06-07 23:34:05 +00:00
Cargo.toml rutabaga_gfx: release commit 0.1.2 2023-08-23 01:02:33 +00:00
LICENSE crosvm: add licensing/description to alpha crates 2023-01-14 02:05:06 +00:00