package/mesa3d: add freedreno-virtio config

Add a config for enabling the freedreno virtio KMD backend, in the same
pattern as amdgpu-virtio.

Signed-off-by: Joseph Kogut <joseph@anodize.com>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
This commit is contained in:
Joseph Kogut
2026-05-14 14:43:38 -07:00
committed by Romain Naour
parent ab1de2ec7f
commit 84dd56f072
2 changed files with 21 additions and 0 deletions

View File

@@ -150,6 +150,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
# the toolchain having sync4 primitives, which is always a given
# for arm/aarch64.
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_SUPPORTED_DRIVER
select BR2_PACKAGE_LIBDRM_FREEDRENO
help
Mesa driver for Freedreno GPUs.
@@ -435,6 +436,16 @@ config BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_DRIVER_AMDGPU
Select this when running Mesa inside a virtual machine
with virtio-gpu host native context support.
config BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_DRIVER_FREEDRENO
bool "freedreno-virtio"
depends on BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
help
Enable VirtIO support for freedreno native contexts
used by the freedreno driver.
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

View File

@@ -157,6 +157,16 @@ else
MESA3D_CONF_OPTS += -Damdgpu-virtio=false
endif
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO),y)
MESA3D_FREEDRENO_KMDS = msm
ifeq ($(BR2_PACKAGE_MESA3D_HOST_NATIVE_CONTEXT_DRIVER_FREEDRENO),y)
MESA3D_FREEDRENO_KMDS += virtio
endif
MESA3D_CONF_OPTS += \
-Dfreedreno-kmds=$(subst $(space),$(comma),$(MESA3D_FREEDRENO_KMDS))
endif
ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y)
MESA3D_DEPENDENCIES += host-python-ply
endif