From 22e7f562fb4b5becc342fe7d60c37c70e42ccf6b Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Thu, 12 Jun 2025 14:14:32 +0200 Subject: [PATCH] mesa: do not build nouveau NVIDIA gallium-llvm driver if not requested The Nouveau driver is used for NVIDIA GPUs and thus doesn't really need to be always enabled when building gallium-llvm drivers. So let's guard it with a nouveau PACKAGECONFIG. The only intended change is nouveau not being build on target mesa on non-x86/i686 machines when building gallium-llvm drivers as I assume NVIDIA GPUs aren't that common on other CPU architectures (tegra already bringing in the nouveau driver should handle the NVIDIA SoCs that would benefit from nouveau driver and thus are not impacted by this change). Signed-off-by: Quentin Schulz Signed-off-by: Richard Purdie --- meta/recipes-graphics/mesa/mesa.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 291124f29f5..56ac18ea534 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -93,10 +93,10 @@ PACKAGECONFIG = " \ # skip all Rust dependencies if we are not building OpenCL" INHIBIT_DEFAULT_RUST_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'opencl', '', '1', d)}" -PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd svga" -PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd svga" -PACKAGECONFIG:append:i686 = " libclc gallium-llvm intel amd svga" -PACKAGECONFIG:append:class-native = " libclc gallium-llvm amd svga" +PACKAGECONFIG:append:x86 = " libclc gallium-llvm intel amd nouveau svga" +PACKAGECONFIG:append:x86-64 = " libclc gallium-llvm intel amd nouveau svga" +PACKAGECONFIG:append:i686 = " libclc gallium-llvm intel amd nouveau svga" +PACKAGECONFIG:append:class-native = " libclc gallium-llvm amd nouveau svga" # "gbm" requires "opengl" PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" @@ -173,14 +173,16 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}" GALLIUMDRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',r300', '', d)}" GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}" +GALLIUMDRIVERS_NOUVEAU = "${@bb.utils.contains('PACKAGECONFIG', 'nouveau', ',nouveau', '', d)}" GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}" GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe" # llvmpipe crashes on x32 GALLIUMDRIVERS_LLVMPIPE:x86-x32 = "" GALLIUMDRIVERS_SVGA = "${@bb.utils.contains('PACKAGECONFIG', 'svga', ',svga', '', d)}" -GALLIUMDRIVERS_LLVM = ",nouveau${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_AMD}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}" +GALLIUMDRIVERS_LLVM = "${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_AMD}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_NOUVEAU}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}" PACKAGECONFIG[amd] = "" +PACKAGECONFIG[nouveau] = "" PACKAGECONFIG[svga] = "" PACKAGECONFIG[virgl] = "" -- 2.47.3