mirror-linux/include/uapi/drm
Alyssa Rosenzweig 12a2bf6765 drm: Add UAPI for the Asahi driver
This adds the UAPI for the Asahi driver targeting the GPU in the Apple
M1 and M2 series systems on chip. The UAPI design is based on other
modern Vulkan-capable drivers, including Xe and Panthor. Memory
management is based on explicit VM management. Synchronization is
exclusively explicit sync.

This UAPI is validated against our open source Mesa stack, which is
fully conformant to the OpenGL 4.6, OpenGL ES 3.2, OpenCL 3.0, and
Vulkan 1.4 standards. The Vulkan driver supports sparse, exercising the
VM_BIND mechanism.

This patch adds the standalone UAPI header. It is implemented by an open
source DRM driver written in Rust. We fully intend to upstream this
driver when possible. However, as a production graphics driver, it
depends on a significant number of Rust abstractions that will take a
long time to upstream. In the mean time, our userspace is upstream in
Mesa but is not allowed to probe with upstream Mesa as the UAPI is not
yet reviewed and merged in the upstream kernel. Although we ship a
patched Mesa in Fedora Asahi Remix, any containers shipping upstream
Mesa builds are broken for our users, including upstream Flatpak and
Waydroid runtimes. Additionally, it forces us to maintain forks of Mesa
and virglrenderer, which complicates bisects.

The intention in sending out this patch is for this UAPI to be
thoroughly reviewed. Once we as the DRM community are satisfied with the
UAPI, this header lands signifying that the UAPI is stable and must only
be evolved in backwards-compatible ways; it will be the UAPI implemented
in the DRM driver that eventually lands upstream. That promise lets us
enable upstream Mesa, solving all these issues while the upstream Rust
abstractions are developed.

https://github.com/alyssarosenzweig/linux/commits/agx-uapi-v7 contains
the DRM driver implementing this proposed UAPI.

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33984 contains
the Mesa patches to implement this proposed UAPI.

That Linux and Mesa branch together give a complete graphics/compute
stack on top of this UAPI.

Co-developed-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Asahi Lina <lina@asahilina.net>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Janne Grunau <j@jannau.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Link: https://lore.kernel.org/r/20250408-agx-uapi-v7-1-ad122d4f7324@rosenzweig.io
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
2025-04-08 17:15:57 -04:00
..
amdgpu_drm.h drm/amdgpu: Add flags to distinguish vf/pf/pt mode 2025-02-12 21:04:08 -05:00
amdxdna_accel.h accel/amdxdna: Remove DRM_AMDXDNA_HWCTX_CONFIG_NUM 2024-12-17 12:10:07 -06:00
armada_drm.h
asahi_drm.h drm: Add UAPI for the Asahi driver 2025-04-08 17:15:57 -04:00
drm.h drm/syncobj: Extend EXPORT_SYNC_FILE for timeline syncobjs 2025-04-01 18:30:25 +02:00
drm_fourcc.h drm: add modifiers for Apple GPU layouts 2025-03-14 09:45:50 -04:00
drm_mode.h drm: Add missing documentation for struct drm_plane_size_hint 2024-08-12 11:15:14 +02:00
drm_sarea.h
etnaviv_drm.h Revert "drm/etnaviv: Expose a few more chipspecs to userspace" 2024-04-25 16:56:20 +02:00
exynos_drm.h
habanalabs_accel.h accel/habanalabs/gaudi2: add signed dev info uAPI 2023-12-19 11:09:43 +02:00
i915_drm.h drm/i915: Support replaying GPU hangs with captured context image 2024-05-16 07:37:05 +00:00
ivpu_accel.h accel/ivpu: Add API for command queue create/destroy/submit 2025-01-09 09:35:44 +01:00
lima_drm.h
msm_drm.h drm/msm: Expose uche trap base via uapi 2025-01-03 07:20:27 -08:00
nouveau_drm.h drm/nouveau: use tile_mode and pte_kind for VM_BIND bo allocations 2024-05-13 22:27:33 +02:00
omap_drm.h
panfrost_drm.h drm/panfrost: Add cycle counter job requirement 2024-09-02 10:13:38 +01:00
panthor_drm.h drm/panthor: Convert IOCTL defines to an enum 2025-02-07 18:35:25 +01:00
pvr_drm.h drm/imagination: Numerous documentation fixes. 2023-11-28 18:56:03 +01:00
qaic_accel.h accel/qaic: Fix typo for struct qaic_manage_trans_passthrough 2024-12-13 08:55:09 -07:00
qxl_drm.h
radeon_drm.h
tegra_drm.h
v3d_drm.h drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL 2024-12-04 08:44:27 -03:00
vc4_drm.h
vgem_drm.h
virtgpu_drm.h drm/virtio: Add capset definitions to UAPI 2025-03-28 04:53:51 +03:00
vmwgfx_drm.h drm/vmwgfx: Add SPDX header to vmwgfx_drm.h 2024-01-30 14:18:19 -05:00
xe_drm.h drm/xe/uapi: Add DRM_XE_QUERY_CONFIG_FLAG_HAS_CPU_ADDR_MIRROR 2025-03-06 11:35:52 -08:00