agx: Fix implicit sync for virtgpu
agx: Fix implicit sync for virtgpu
The asahi kernel driver is a pure-explicit-sync driver and userspace is
required to handle implicit sync itself, by importing/exporting fences
in shared dma-bufs. Mesa handles this in its own native or guest
context, but dma-buf fences are not shared between the guest and the
host, so this breaks implicit sync across the VM boundary.
To make this work, explicitly pass a resource list to the host so it can
perform the implicit sync dance, like we do in agx_batch.c. This
essentially turns the virtgpu protocol into an implicit sync protocol
(like many other legacy GPU drivers), which makes sense here since we
don't particularly have the primitives to pass through and manage "host"
syncobjs that we'd need to do it at that level.
Signed-off-by: Asahi Lina <lina@asahilina.net>
Companion virglrenderer MR: virglrenderer!1 (merged)
Draft because this doesn't cover hk. @alyssa I nominate you for that!