From: Joseph Kogut <joseph@anodize.com>
To: buildroot@buildroot.org
Cc: Bernd Kuhls <bernd@kuhls.net>,
Joseph Kogut <joseph.kogut@gmail.com>,
Romain Naour <romain.naour@gmail.com>,
Joseph Kogut <joseph@anodize.com>,
Romain Naour <romain.naour@smile.fr>
Subject: [Buildroot] [PATCH v3 1/4] package/mesa3d: add amdgpu-virtio config
Date: Thu, 14 May 2026 14:43:37 -0700 [thread overview]
Message-ID: <20260514-mesa3d-amdgpu-virtio-v3-1-dd75eca7fa50@anodize.com> (raw)
In-Reply-To: <20260514-mesa3d-amdgpu-virtio-v3-0-dd75eca7fa50@anodize.com>
Add a config section for host native context drivers, which currently
use virtio-gpu as a backend to mediate access to the host kernel's DRM
uAPI.
https://www.collabora.com/news-and-blog/blog/2025/01/15/the-state-of-gfx-virtualization-using-virglrenderer/
Signed-off-by: Joseph Kogut <joseph@anodize.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
---
package/mesa3d/Config.in | 19 +++++++++++++++++++
package/mesa3d/mesa3d.mk | 6 ++++++
2 files changed, 25 insertions(+)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 66ebe04394..633f9eec1f 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -254,6 +254,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI
depends on BR2_i386 || BR2_x86_64
depends on BR2_PACKAGE_MESA3D_LLVM
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+ select BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_SUPPORTED_DRIVER
select BR2_PACKAGE_LIBDRM_AMDGPU
select BR2_PACKAGE_LIBDRM_RADEON
select BR2_PACKAGE_LLVM_AMDGPU
@@ -338,6 +339,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_AMD
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence
select BR2_PACKAGE_LIBDRM_AMDGPU
select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
+ select BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_SUPPORTED_DRIVER
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
RADV is a userspace driver that implements the
@@ -412,6 +414,23 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO
help
Vulkan VirtIO (venus) driver.
+comment "Host native context drivers"
+ depends on BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_SUPPORTED_DRIVER
+
+config BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_DRIVER_AMDGPU
+ bool "amdgpu-virtio"
+ depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI || \
+ BR2_PACKAGE_MESA3D_VULKAN_DRIVER_AMD
+ help
+ Enable VirtIO support for AMDGPU native contexts
+ used by the radeonsi (OpenGL) and RADV (Vulkan) drivers.
+
+ Select this when running Mesa inside a virtual machine
+ with virtio-gpu host native context support.
+
+config BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_SUPPORTED_DRIVER
+ bool
+
if BR2_PACKAGE_MESA3D_DRIVER
comment "OpenGL API Support"
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 1eaa4c577e..34597966af 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -151,6 +151,12 @@ ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV),y)
MESA3D_DEPENDENCIES += host-python-pycparser
endif
+ifeq ($(BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_DRIVER_AMDGPU),y)
+MESA3D_CONF_OPTS += -Damdgpu-virtio=true
+else
+MESA3D_CONF_OPTS += -Damdgpu-virtio=false
+endif
+
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y)
MESA3D_DEPENDENCIES += host-python-ply
endif
--
2.54.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-05-14 21:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 21:43 [Buildroot] [PATCH v3 0/4] package/mesa3d: add host native context configs Joseph Kogut
2026-05-14 21:43 ` Joseph Kogut [this message]
2026-05-15 11:56 ` [Buildroot] [PATCH v3 1/4] package/mesa3d: add amdgpu-virtio config Romain Naour via buildroot
2026-05-14 21:43 ` [Buildroot] [PATCH v3 2/4] package/mesa3d: add freedreno-virtio config Joseph Kogut
2026-05-14 21:43 ` [Buildroot] [PATCH v3 3/4] package/mesa3d: add freedreno vulkan driver config Joseph Kogut
2026-05-14 21:43 ` [Buildroot] [PATCH v3 4/4] DEVELOPERS: add package/mesa3d for Joseph Kogut Joseph Kogut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260514-mesa3d-amdgpu-virtio-v3-1-dd75eca7fa50@anodize.com \
--to=joseph@anodize.com \
--cc=bernd@kuhls.net \
--cc=buildroot@buildroot.org \
--cc=joseph.kogut@gmail.com \
--cc=romain.naour@gmail.com \
--cc=romain.naour@smile.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.