diff mbox series

[3/3] mesa: add new package for Mali CSFFW Valhall firmware

Message ID 20240531-panthor-v1-3-1a76fd752c1b@cherry.de
State New
Headers show
Series prepare Panthor (open-source) support for Arm GPU | expand

Commit Message

Quentin Schulz May 31, 2024, 11:53 a.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

This firmware is necessary for closed-source mali blob + drivers and
open-source Panthor (via Mesa + Linux kernel) drivers.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Quentin Schulz June 4, 2024, 2:23 p.m. UTC | #1
Hi all,

The title is misleading, this isn't for mesa but for linux-firmware.

I know this has been reverted in master-next but I think we should be 
able to take it in, even if the mesa changes don't make it just yet as 
they aren't really dependent on each other except if someone wants to 
use open-source mesa on RK3588(S).

Cheers,
Quentin

On 5/31/24 1:53 PM, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@cherry.de>
> 
> This firmware is necessary for closed-source mali blob + drivers and
> open-source Panthor (via Mesa + Linux kernel) drivers.
> 
> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
> ---
>   meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb | 11 +++++++++++
>   1 file changed, 11 insertions(+)
> 
> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
> index 026e5dba00..4a87105d98 100644
> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
> @@ -39,6 +39,7 @@ LICENSE = "\
>       & Firmware-kaweth \
>       & Firmware-linaro \
>       & Firmware-Lontium \
> +    & Firmware-mali_csffw \
>       & Firmware-Marvell \
>       & Firmware-mediatek \
>       & Firmware-microchip \
> @@ -113,6 +114,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
>                       file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
>                       file://LICENCE.linaro;md5=936d91e71cf9cd30e733db4bf11661cc \
>                       file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \
> +                    file://LICENCE.mali_csffw;md5=e064aaec4d21ef856e1b76a6f5dc435f \
>                       file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
>                       file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
>                       file://LICENCE.microchip;md5=db753b00305675dfbf120e3f24a47277 \
> @@ -192,6 +194,7 @@ NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
>   NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
>   NO_GENERIC_LICENSE[Firmware-linaro] = "LICENCE.linaro"
>   NO_GENERIC_LICENSE[Firmware-Lontium] = "LICENSE.Lontium"
> +NO_GENERIC_LICENSE[Firmware-mali_csffw] = "LICENCE.mali_csffw"
>   NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
>   NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek"
>   NO_GENERIC_LICENSE[Firmware-microchip] = "LICENCE.microchip"
> @@ -354,6 +357,7 @@ PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
>                ${PN}-bnx2 \
>                ${PN}-bnx2x \
>                ${PN}-liquidio \
> +             ${PN}-mali-csffw-arch108 ${PN}-mali-csffw-license \
>                ${PN}-mellanox \
>                ${PN}-nvidia-license \
>                ${PN}-nvidia-tegra-k1 ${PN}-nvidia-tegra \
> @@ -608,6 +612,13 @@ LICENSE:${PN}-lt9611uxc = "Firmware-Lontium"
>   FILES:${PN}-lontium-license = "${nonarch_base_libdir}/firmware/LICENSE.Lontium"
>   FILES:${PN}-lt9611uxc = "${nonarch_base_libdir}/firmware/lt9611uxc_fw.bin"
>   
> +# For Arm Mali
> +LICENSE:${PN}-mali-csffw-arch108 = "Firmware-mali_csffw"
> +FILES:${PN}-mali-csffw-license = "${nonarch_base_libdir}/firmware/LICENCE.mali_csffw"
> +FILES:${PN}-mali-csffw-arch108 = "${nonarch_base_libdir}/firmware/arm/mali/arch10.8/mali_csffw.bin"
> +
> +RDEPENDS:${PN}-mali-csffw-arch108 += "${PN}-mali-csffw-license"
> +
>   # For marvell
>   LICENSE:${PN}-pcie8897 = "Firmware-Marvell"
>   LICENSE:${PN}-pcie8997 = "Firmware-Marvell"
>
Richard Purdie June 4, 2024, 2:59 p.m. UTC | #2
On Tue, 2024-06-04 at 16:23 +0200, Quentin Schulz via
lists.openembedded.org wrote:
> Hi all,
> 
> The title is misleading, this isn't for mesa but for linux-firmware.
> 
> I know this has been reverted in master-next 

has it? :/ 

I don't see that...

Cheers,

Richard
Quentin Schulz June 4, 2024, 3:04 p.m. UTC | #3
Hi Richard,

On 6/4/24 4:59 PM, Richard Purdie wrote:
> On Tue, 2024-06-04 at 16:23 +0200, Quentin Schulz via
> lists.openembedded.org wrote:
>> Hi all,
>>
>> The title is misleading, this isn't for mesa but for linux-firmware.
>>
>> I know this has been reverted in master-next
> 
> has it? :/
> 
> I don't see that...
> 

Well, I should have said "removed" and not from master-next but from 
abelloni/master-next in poky-contrib. It used to be there (got a mail in 
the ML from the SWAT team complaining about broken mesa build recently).

I'm trying to figure out the changes needed for this mesa update (the 
patch 2 in this series), but this getting quite difficult as I have no 
experience with mesa nor meson and the changes aren't trivial to me 
reading the git log of all meson files in the repo.

What I can say already is that it seems the iris Gallium driver now 
requires libclc as well, which means mesa-native as built on x86 hosts 
will require that, which means bringing in meta-clang... I'll continue 
to investigate a bit more to at least get something to compile (if I can 
manage to) on my x86 build machine, both mesa and mesa-native in its 
default PACKAGECONFIG config from current master, and then hopefully 
send an RFC and we can discuss there. The whole migration from clc to 
rusticl for some drivers is also confusing me, so will probably need 
some help there, especially since we have this commit already in the 
last (few?) release(s): 
https://git.openembedded.org/openembedded-core/tree/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch

Cheers,
Quentin
Richard Purdie June 5, 2024, 6:15 a.m. UTC | #4
Hi Quentin,

On Tue, 2024-06-04 at 17:04 +0200, Quentin Schulz wrote:
> Well, I should have said "removed" and not from master-next but from 
> abelloni/master-next in poky-contrib. It used to be there (got a mail in 
> the ML from the SWAT team complaining about broken mesa build recently).

I understand now, I was just a bit surprised as I hadn't looked at in
in my own master-next branch!

> I'm trying to figure out the changes needed for this mesa update (the
> patch 2 in this series), but this getting quite difficult as I have no 
> experience with mesa nor meson and the changes aren't trivial to me 
> reading the git log of all meson files in the repo.
> 
> What I can say already is that it seems the iris Gallium driver now 
> requires libclc as well, which means mesa-native as built on x86 hosts 
> will require that, which means bringing in meta-clang... I'll continue 
> to investigate a bit more to at least get something to compile (if I can 
> manage to) on my x86 build machine, both mesa and mesa-native in its 
> default PACKAGECONFIG config from current master, and then hopefully 
> send an RFC and we can discuss there. The whole migration from clc to
> rusticl for some drivers is also confusing me, so will probably need 
> some help there, especially since we have this commit already in the 
> last (few?) release(s): 
> https://git.openembedded.org/openembedded-core/tree/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch

It does sound complicated, I'm afraid I don't have any specific advice
but avoiding a rust dependency would be nice if we can and requiring
clang would be much more problematic.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
index 026e5dba00..4a87105d98 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
@@ -39,6 +39,7 @@  LICENSE = "\
     & Firmware-kaweth \
     & Firmware-linaro \
     & Firmware-Lontium \
+    & Firmware-mali_csffw \
     & Firmware-Marvell \
     & Firmware-mediatek \
     & Firmware-microchip \
@@ -113,6 +114,7 @@  LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
                     file://LICENCE.linaro;md5=936d91e71cf9cd30e733db4bf11661cc \
                     file://LICENSE.Lontium;md5=4ec8dc582ff7295f39e2ca6a7b0be2b6 \
+                    file://LICENCE.mali_csffw;md5=e064aaec4d21ef856e1b76a6f5dc435f \
                     file://LICENCE.Marvell;md5=28b6ed8bd04ba105af6e4dcd6e997772 \
                     file://LICENCE.mediatek;md5=7c1976b63217d76ce47d0a11d8a79cf2 \
                     file://LICENCE.microchip;md5=db753b00305675dfbf120e3f24a47277 \
@@ -192,6 +194,7 @@  NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
 NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
 NO_GENERIC_LICENSE[Firmware-linaro] = "LICENCE.linaro"
 NO_GENERIC_LICENSE[Firmware-Lontium] = "LICENSE.Lontium"
+NO_GENERIC_LICENSE[Firmware-mali_csffw] = "LICENCE.mali_csffw"
 NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
 NO_GENERIC_LICENSE[Firmware-mediatek] = "LICENCE.mediatek"
 NO_GENERIC_LICENSE[Firmware-microchip] = "LICENCE.microchip"
@@ -354,6 +357,7 @@  PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
              ${PN}-bnx2 \
              ${PN}-bnx2x \
              ${PN}-liquidio \
+             ${PN}-mali-csffw-arch108 ${PN}-mali-csffw-license \
              ${PN}-mellanox \
              ${PN}-nvidia-license \
              ${PN}-nvidia-tegra-k1 ${PN}-nvidia-tegra \
@@ -608,6 +612,13 @@  LICENSE:${PN}-lt9611uxc = "Firmware-Lontium"
 FILES:${PN}-lontium-license = "${nonarch_base_libdir}/firmware/LICENSE.Lontium"
 FILES:${PN}-lt9611uxc = "${nonarch_base_libdir}/firmware/lt9611uxc_fw.bin"
 
+# For Arm Mali
+LICENSE:${PN}-mali-csffw-arch108 = "Firmware-mali_csffw"
+FILES:${PN}-mali-csffw-license = "${nonarch_base_libdir}/firmware/LICENCE.mali_csffw"
+FILES:${PN}-mali-csffw-arch108 = "${nonarch_base_libdir}/firmware/arm/mali/arch10.8/mali_csffw.bin"
+
+RDEPENDS:${PN}-mali-csffw-arch108 += "${PN}-mali-csffw-license"
+
 # For marvell
 LICENSE:${PN}-pcie8897 = "Firmware-Marvell"
 LICENSE:${PN}-pcie8997 = "Firmware-Marvell"