diff mbox series

[meta-rockchip,v3,5/6] mesa: rework bbappend to default to panfrost

Message ID 20250627-mesa-panthor-v3-5-798c24a9eef3@cherry.de
State New
Headers show
Series mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 | expand

Commit Message

Quentin Schulz June 27, 2025, 2:19 p.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

Let's assume most Rockchip SoCs to come will be based on an Arm Mali GPU
supported by Panfrost so let's always add panfrost drivers to mesa.

Make the Mali-400/450 SoC such as RK3066, RK3188 and RK3328 use lima
instead.

Finally, do not add any mesa mali (panfrost or lima) driver for GPU-less
SoC like RK3308.

This will allow to not need to touch this recipe every time we add
support for a new SoC with GPU supported by Mesa Panfrost.

This also **almost** brings support for the GPU found on RK3588.

Note that some GPUs (gen10; Valhall; Panthor; like on RK3588) still
require additional firmware (CSFFW).

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 recipes-graphics/mesa/mesa.bbappend | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index 1057e114b7569cc9ac841cd0c6818ac7f6c3827c..50d62b8ac50afe1712dfa03f479d120acc3e4199 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,8 +1,11 @@ 
-PACKAGECONFIG:append:rk3066 = " lima"
-PACKAGECONFIG:append:rk3188 = " lima"
-PACKAGECONFIG:append:rk3288 = " libclc panfrost"
-PACKAGECONFIG:append:rk3328 = " lima"
-PACKAGECONFIG:append:rk3399 = " libclc panfrost"
-PACKAGECONFIG:append:rk3566 = " libclc panfrost"
-PACKAGECONFIG:append:rk3568 = " libclc panfrost"
-PACKAGECONFIG:append:px30 = " libclc panfrost"
+MALI_DRIVER = "panfrost"
+# MALI 400
+MALI_DRIVER:rk3066 = "lima"
+MALI_DRIVER:rk3188 = "lima"
+# MALI 450
+MALI_DRIVER:rk3328 = "lima"
+# No GPU
+MALI_DRIVER:rk3308 = ""
+
+PACKAGECONFIG:append:rockchip = " ${@bb.utils.filter('MALI_DRIVER', 'lima panfrost', d)}"
+PACKAGECONFIG:append:rockchip = "${@bb.utils.contains('MALI_DRIVER', 'panfrost', ' libclc', '', d)}"