drm: asahi: Fix implicit sync across the VM boundary
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 take a resource list from the guest and then perform the implicit sync support dance in virglrenderer. This mirrors the code in agx_batch.c in mesa, and 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 mesa MR: mesa!288 (closed)