mesa/src/asahi/lib
Asahi Lina 01ef3152c9 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>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
2024-10-05 18:30:10 +00:00
..
shaders libagx: add in-place decompression kernel 2024-09-02 23:27:15 +00:00
tests asahi: add missing tib alignment check 2024-01-10 08:44:38 -04:00
agx_bg_eot.c agx: support bindless block image store 2024-09-02 23:27:14 +00:00
agx_bg_eot.h asahi: stop fixing up USC addresses 2024-08-12 18:36:26 -04:00
agx_bo.c asahi: always pass align parameter for BOs 2024-08-12 18:36:26 -04:00
agx_bo.h asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
agx_border.c ail: swallow up formats 2024-09-02 23:27:14 +00:00
agx_device.c agx: Fix implicit sync for virtgpu 2024-10-05 18:30:10 +00:00
agx_device.h agx: Fix implicit sync for virtgpu 2024-10-05 18:30:10 +00:00
agx_device_virtio.c agx: Fix implicit sync for virtgpu 2024-10-05 18:30:10 +00:00
agx_device_virtio.h asahi: add broken bits of unstable Linux UAPI 2024-06-14 15:44:30 +00:00
agx_helpers.h asahi: add agx_fill_decompress_push helper 2024-09-02 23:27:15 +00:00
agx_iokit.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_linker.c asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
agx_linker.h asahi: implement rba2 semantics for vbo 2024-06-16 12:15:22 -04:00
agx_nir_format_helpers.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_nir_lower_alpha.c treewide: use nir_metadata_control_flow 2024-06-17 16:28:14 -04:00
agx_nir_lower_gs.c libagx: add in-place decompression kernel 2024-09-02 23:27:15 +00:00
agx_nir_lower_gs.h libagx: add in-place decompression kernel 2024-09-02 23:27:15 +00:00
agx_nir_lower_ia.c asahi: drop #includes 2024-07-26 18:40:47 +00:00
agx_nir_lower_msaa.c treewide: use nir_def_replace sometimes 2024-06-21 15:36:56 +00:00
agx_nir_lower_sample_intrinsics.c treewide: use nir_def_replace sometimes 2024-06-21 15:36:56 +00:00
agx_nir_lower_tess.c asahi: add TES->compute lowering 2024-07-26 18:40:47 +00:00
agx_nir_lower_texture.c ail: swallow up formats 2024-09-02 23:27:14 +00:00
agx_nir_lower_tilebuffer.c nir: make fclamp_pos_mali and fsat_signed_mali opcodes generic 2024-10-03 09:02:07 +00:00
agx_nir_lower_uvs.c treewide: use nir_metadata_control_flow 2024-06-17 16:28:14 -04:00
agx_nir_lower_vbo.c ail: swallow up formats 2024-09-02 23:27:14 +00:00
agx_nir_lower_vbo.h asahi: implement rba2 semantics for vbo 2024-06-16 12:15:22 -04:00
agx_nir_passes.h asahi: add AGX_TEXTURE_FLAG_CLAMP_TO_0 flag 2024-06-07 16:57:03 +00:00
agx_nir_prolog_epilog.c asahi: don't count helper invs in pipeline stats query 2024-08-06 11:48:04 -04:00
agx_ppp.h asahi: split frag shader words 2024-05-16 13:25:56 -04:00
agx_scratch.c asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
agx_scratch.h asahi/lib: use #pragma once 2024-02-14 21:02:32 +00:00
agx_tilebuffer.c asahi: add tib sample setter helper 2024-10-05 18:30:10 +00:00
agx_tilebuffer.h asahi: add tib sample setter helper 2024-10-05 18:30:10 +00:00
agx_usc.h asahi: factor out agx_usc_shared_non_fragment 2024-09-02 23:27:15 +00:00
agx_uvs.h asahi: extend varying linking for tri fan weirdness 2024-05-14 04:57:27 +00:00
agx_va.c asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
asahi_proto.h agx: Fix implicit sync for virtgpu 2024-10-05 18:30:10 +00:00
decode.c asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
decode.h asahi: stop fixing up USC addresses 2024-08-12 18:36:26 -04:00
dyld_interpose.h asahi: Clang-format the subtree 2022-12-27 22:46:29 +00:00
meson.build libagx: add in-place decompression kernel 2024-09-02 23:27:15 +00:00
pool.c asahi: introduce agx_va data structure 2024-08-12 18:45:57 -04:00
pool.h asahi: split out genxml/ directory 2024-02-14 21:02:32 +00:00
unstable_asahi_drm.h asahi: Update to UAPI 10011 2024-08-12 18:35:47 -04:00
wrap.c asahi: drop agx_bo::type 2024-08-12 18:36:26 -04:00