diff mbox series

[1/2] mesa: do not build r300 AMD gallium-llvm driver if not requested

Message ID 20250612-mesa-pkgconfig-no-hardcode-llvm-v1-1-479632e13175@cherry.de
State New
Headers show
Series mesa: disable building nouveau/r300 on non-x86/i686 machines by default | expand

Commit Message

Quentin Schulz June 12, 2025, 12:14 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

It doesn't make much sense to always build the r300 AMD gallium LLVM
driver as that's HW-specific.

Instead, let's guard it with the amd PACKAGECONFIG.

This will only disable R300 for target mesa on non-x86/i686 machines
where gallium-llvm PACKAGECONFIG is selected but not amd, otherwise
behavior is left unchanged.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Dmitry Baryshkov June 13, 2025, 12:25 a.m. UTC | #1
On Thu, Jun 12, 2025 at 02:14:31PM +0200, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
> 
> It doesn't make much sense to always build the r300 AMD gallium LLVM
> driver as that's HW-specific.
> 
> Instead, let's guard it with the amd PACKAGECONFIG.
> 
> This will only disable R300 for target mesa on non-x86/i686 machines
> where gallium-llvm PACKAGECONFIG is selected but not amd, otherwise
> behavior is left unchanged.
> 
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
>  meta/recipes-graphics/mesa/mesa.inc | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

For the series:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b222e72fdddd7e17dfbefdb776eead027a216f2d..291124f29f5fe755abb327874129cc39d8c7d994 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -171,13 +171,14 @@  GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', ''
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
 
 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_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 = ",r300,nouveau${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}"
+GALLIUMDRIVERS_LLVM = ",nouveau${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_AMD}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}"
 
 PACKAGECONFIG[amd] = ""
 PACKAGECONFIG[svga] = ""