* [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188
@ 2025-06-27 14:19 Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 1/6] mesa: remove kmsro from PACKAGECONFIG Quentin Schulz
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz, Trevor Woerner
This removes now unneeded kmsro PACKAGECONFIG as mesa dropped it (as
well as OE-Core's recipe).
The Panfrost drivers currently do not compile anymore due to a missing
libclc PACKAGECONFIG dependency so this adds the libclc to the
Panfrost-supported SoCs.
This refactors a bit the bbappend to hopefully require a bit less
maintenance with newer SoCs with most assumed to be supported by
Panfrost mesa drivers.
This enables (untested) support for lima mesa driver on RK3066 and
RK3188.
Finally, this enables Panthor support for RK3588(S).
Panthor is the open-source implementation for the Arm GPU Valhall series
both in the Linux kernel and Mesa userspace. In the latter, the panfrost
"driver" is actually handling this version of the Arm GPU. One therefore
needs to enable panfrost in PACKAGECONFIG to be able to use this
open-source implementation.
The open-source implementation still requires a proprietary blob which
is running on the GPU: mali_csffw.bin. Note that the closed-source
implementation (libmali and vendor kernel drivers) also requires this
blob.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
Changes in v3:
- added now-required libclc dependency for panfrost,
- added support for RK3066 and RK3188 (though untested)
- refactored bbappend to default to panfrost unless specified otherwise,
- Link to v2: https://lore.kernel.org/r/20250415-mesa-panthor-v2-0-a7850d0091fe@cherry.de
Changes in v2:
- rebased on top of master with mesa 25.0 update merged
- added patch 3 which removes kmsro from PACKAGECONFIG as it's now
unnecessary,
- Link to v1: https://lore.kernel.org/r/20240531-mesa-panthor-v1-0-8cfb4d17ad3a@cherry.de
---
Quentin Schulz (6):
mesa: remove kmsro from PACKAGECONFIG
mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs
mesa: enable lima for RK3066 boards
mesa: enable lima for RK3188 boards
mesa: rework bbappend to default to panfrost
mesa: add support for RK3588(S)
recipes-graphics/mesa/mesa.bbappend | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
---
base-commit: d01077165243de983e2d12c9e75e9818bdbb5a4d
change-id: 20240531-mesa-panthor-9c31ca1aa31f
Best regards,
--
Quentin Schulz <quentin.schulz@cherry.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 1/6] mesa: remove kmsro from PACKAGECONFIG
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 2/6] mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs Quentin Schulz
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
Mesa has dropped[1] support for a separate kmsro option to the
gallium-drivers.
It is therefore not necessary to pass it to PACKAGECONFIG anymore,
especially since the kmsro PACKAGECONFIG doesn't exit in the mesa recipe
anymore[2].
[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/89863a050bea429d9574a307bc28953bb60accaf
[2] https://git.openembedded.org/openembedded-core/commit/?id=3d9ec347e651e05d0246a8723ca4038bb1f5b765
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
recipes-graphics/mesa/mesa.bbappend | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index 00cc15c6221c9bce0a1299fc81b63996744a2279..e0b38ce4d0cea913ea1ecafd43d42bb909a312fa 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,6 +1,6 @@
-PACKAGECONFIG:append:rk3288 = " kmsro panfrost"
-PACKAGECONFIG:append:rk3328 = " kmsro lima"
-PACKAGECONFIG:append:rk3399 = " kmsro panfrost"
-PACKAGECONFIG:append:rk3566 = " kmsro panfrost"
-PACKAGECONFIG:append:rk3568 = " kmsro panfrost"
-PACKAGECONFIG:append:px30 = " kmsro panfrost"
+PACKAGECONFIG:append:rk3288 = " panfrost"
+PACKAGECONFIG:append:rk3328 = " lima"
+PACKAGECONFIG:append:rk3399 = " panfrost"
+PACKAGECONFIG:append:rk3566 = " panfrost"
+PACKAGECONFIG:append:rk3568 = " panfrost"
+PACKAGECONFIG:append:px30 = " panfrost"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 2/6] mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 1/6] mesa: remove kmsro from PACKAGECONFIG Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 3/6] mesa: enable lima for RK3066 boards Quentin Schulz
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz, Trevor Woerner
From: Quentin Schulz <quentin.schulz@cherry.de>
Panfrost mesa drivers do not compile without libclc support anymore, I
assume since commit 20970bcd9652 ("panfrost: Add base of OpenCL C
infrastructure") merged in 25.1.0.
So this adds the missing libclc PACKAGECONFIG to Panfrost-supported
SoCs.
Note that mesa recipe in OE-Core will be updated to not build panfrost
if libclc PACKAGECONFIG is missing.
Reported-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
recipes-graphics/mesa/mesa.bbappend | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index e0b38ce4d0cea913ea1ecafd43d42bb909a312fa..507e2fae98e9d98cc6999586564d68af5abd4c0d 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,6 +1,6 @@
-PACKAGECONFIG:append:rk3288 = " panfrost"
+PACKAGECONFIG:append:rk3288 = " libclc panfrost"
PACKAGECONFIG:append:rk3328 = " lima"
-PACKAGECONFIG:append:rk3399 = " panfrost"
-PACKAGECONFIG:append:rk3566 = " panfrost"
-PACKAGECONFIG:append:rk3568 = " panfrost"
-PACKAGECONFIG:append:px30 = " panfrost"
+PACKAGECONFIG:append:rk3399 = " libclc panfrost"
+PACKAGECONFIG:append:rk3566 = " libclc panfrost"
+PACKAGECONFIG:append:rk3568 = " libclc panfrost"
+PACKAGECONFIG:append:px30 = " libclc panfrost"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 3/6] mesa: enable lima for RK3066 boards
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 1/6] mesa: remove kmsro from PACKAGECONFIG Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 2/6] mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 4/6] mesa: enable lima for RK3188 boards Quentin Schulz
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
lima is the the open-source implementation for the GPU found on RK3066,
the Mali 400, so let's enable it for RK3066 boards by default.
Not tested.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
recipes-graphics/mesa/mesa.bbappend | 1 +
1 file changed, 1 insertion(+)
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index 507e2fae98e9d98cc6999586564d68af5abd4c0d..19f0072b61178d71642da4afc9e56880b102069e 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,3 +1,4 @@
+PACKAGECONFIG:append:rk3066 = " lima"
PACKAGECONFIG:append:rk3288 = " libclc panfrost"
PACKAGECONFIG:append:rk3328 = " lima"
PACKAGECONFIG:append:rk3399 = " libclc panfrost"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 4/6] mesa: enable lima for RK3188 boards
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
` (2 preceding siblings ...)
2025-06-27 14:19 ` [meta-rockchip PATCH v3 3/6] mesa: enable lima for RK3066 boards Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 5/6] mesa: rework bbappend to default to panfrost Quentin Schulz
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
lima is the the open-source implementation for the GPU found on RK3188,
the Mali 400, so let's enable it for RK3188 boards by default.
Not tested.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
recipes-graphics/mesa/mesa.bbappend | 1 +
1 file changed, 1 insertion(+)
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index 19f0072b61178d71642da4afc9e56880b102069e..1057e114b7569cc9ac841cd0c6818ac7f6c3827c 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -1,4 +1,5 @@
PACKAGECONFIG:append:rk3066 = " lima"
+PACKAGECONFIG:append:rk3188 = " lima"
PACKAGECONFIG:append:rk3288 = " libclc panfrost"
PACKAGECONFIG:append:rk3328 = " lima"
PACKAGECONFIG:append:rk3399 = " libclc panfrost"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 5/6] mesa: rework bbappend to default to panfrost
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
` (3 preceding siblings ...)
2025-06-27 14:19 ` [meta-rockchip PATCH v3 4/6] mesa: enable lima for RK3188 boards Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 6/6] mesa: add support for RK3588(S) Quentin Schulz
2025-07-03 19:33 ` [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Trevor Woerner
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz
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 --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)}"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [meta-rockchip PATCH v3 6/6] mesa: add support for RK3588(S)
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
` (4 preceding siblings ...)
2025-06-27 14:19 ` [meta-rockchip PATCH v3 5/6] mesa: rework bbappend to default to panfrost Quentin Schulz
@ 2025-06-27 14:19 ` Quentin Schulz
2025-07-03 19:33 ` [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Trevor Woerner
6 siblings, 0 replies; 8+ messages in thread
From: Quentin Schulz @ 2025-06-27 14:19 UTC (permalink / raw)
To: yocto-patches; +Cc: Quentin Schulz
From: Quentin Schulz <quentin.schulz@cherry.de>
The Mali G610 found in the RK3588(S) SoC still requires a blob coming
from a linux-firmware package to work.
Therefore, recommend that package when building mesa for rk3588(s).
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
recipes-graphics/mesa/mesa.bbappend | 3 +++
1 file changed, 3 insertions(+)
diff --git a/recipes-graphics/mesa/mesa.bbappend b/recipes-graphics/mesa/mesa.bbappend
index 50d62b8ac50afe1712dfa03f479d120acc3e4199..d9e7c082fc6be6812b3376496434c4ee823b6f65 100644
--- a/recipes-graphics/mesa/mesa.bbappend
+++ b/recipes-graphics/mesa/mesa.bbappend
@@ -9,3 +9,6 @@ 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)}"
+
+# Mali Gen10 (Valhall, supported by Panthor) requires a firmware blob
+RRECOMMENDS:mesa-megadriver:append:rk3588s = " linux-firmware-mali-csffw-arch108"
--
2.50.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
` (5 preceding siblings ...)
2025-06-27 14:19 ` [meta-rockchip PATCH v3 6/6] mesa: add support for RK3588(S) Quentin Schulz
@ 2025-07-03 19:33 ` Trevor Woerner
6 siblings, 0 replies; 8+ messages in thread
From: Trevor Woerner @ 2025-07-03 19:33 UTC (permalink / raw)
To: Quentin Schulz; +Cc: yocto-patches, Quentin Schulz
On Fri 2025-06-27 @ 04:19:11 PM, Quentin Schulz wrote:
> This removes now unneeded kmsro PACKAGECONFIG as mesa dropped it (as
> well as OE-Core's recipe).
>
> The Panfrost drivers currently do not compile anymore due to a missing
> libclc PACKAGECONFIG dependency so this adds the libclc to the
> Panfrost-supported SoCs.
>
> This refactors a bit the bbappend to hopefully require a bit less
> maintenance with newer SoCs with most assumed to be supported by
> Panfrost mesa drivers.
>
> This enables (untested) support for lima mesa driver on RK3066 and
> RK3188.
>
> Finally, this enables Panthor support for RK3588(S).
>
> Panthor is the open-source implementation for the Arm GPU Valhall series
> both in the Linux kernel and Mesa userspace. In the latter, the panfrost
> "driver" is actually handling this version of the Arm GPU. One therefore
> needs to enable panfrost in PACKAGECONFIG to be able to use this
> open-source implementation.
>
> The open-source implementation still requires a proprietary blob which
> is running on the GPU: mali_csffw.bin. Note that the closed-source
> implementation (libmali and vendor kernel drivers) also requires this
> blob.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
> Changes in v3:
> - added now-required libclc dependency for panfrost,
> - added support for RK3066 and RK3188 (though untested)
> - refactored bbappend to default to panfrost unless specified otherwise,
> - Link to v2: https://lore.kernel.org/r/20250415-mesa-panthor-v2-0-a7850d0091fe@cherry.de
>
> Changes in v2:
> - rebased on top of master with mesa 25.0 update merged
> - added patch 3 which removes kmsro from PACKAGECONFIG as it's now
> unnecessary,
> - Link to v1: https://lore.kernel.org/r/20240531-mesa-panthor-v1-0-8cfb4d17ad3a@cherry.de
>
> ---
> Quentin Schulz (6):
> mesa: remove kmsro from PACKAGECONFIG
> mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs
> mesa: enable lima for RK3066 boards
> mesa: enable lima for RK3188 boards
> mesa: rework bbappend to default to panfrost
> mesa: add support for RK3588(S)
>
> recipes-graphics/mesa/mesa.bbappend | 20 ++++++++++++++------
> 1 file changed, 14 insertions(+), 6 deletions(-)
> ---
For the series:
Reviewed-by: Trevor Woerner <twoerner@gmail.com>
Applied to meta-rockchip, master branch. Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-03 19:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27 14:19 [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 1/6] mesa: remove kmsro from PACKAGECONFIG Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 2/6] mesa: add libclc to PACKAGECONFIG for Panfrost-supported SoCs Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 3/6] mesa: enable lima for RK3066 boards Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 4/6] mesa: enable lima for RK3188 boards Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 5/6] mesa: rework bbappend to default to panfrost Quentin Schulz
2025-06-27 14:19 ` [meta-rockchip PATCH v3 6/6] mesa: add support for RK3588(S) Quentin Schulz
2025-07-03 19:33 ` [meta-rockchip PATCH v3 0/6] mesa: build fixes, refactoring and adding support for RK3588(s), RK3066, RK3188 Trevor Woerner
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.