Skip to contentSkip to conversation

prepare Panthor (open-source) support for Arm GPU

PATCH In review Quentin Schulz 3 participants 8 messages May 31, 2024 – Jun 5, 2024

lore
Share & tools
lore
#0 lore raw

cover prepare Panthor (open-source) support for Arm GPU

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 kmsro and 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 require this blob.

Right now, we're still missing a linux-yocto v6.10+ to be able to test this with everything upstream in Yocto/OE, but I was able to successfully test this with kmscube on a downstream kernel (6.6 + backported patches for GPU and custom patches for DSI support) on an RK3588 Tiger.

---
Quentin Schulz (3):

      linux-firmware: update to 20240513
      mesa: upgrade 24.0.7 -> 24.1.0
      mesa: add new package for Mali CSFFW Valhall firmware
 .../files/0001-drisw-fix-build-without-dri3.patch  | 58 ----------------------
 ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch | 42 ----------------
 .../mesa/{mesa-gl_24.0.7.bb => mesa-gl_24.1.0.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc                |  4 +-
 .../mesa/{mesa_24.0.7.bb => mesa_24.1.0.bb}        |  0
 ...ware_20240312.bb => linux-firmware_20240513.bb} | 33 ++++++++----
 6 files changed, 25 insertions(+), 112 deletions(-)

---
base-commit: 99ff46cc9bb12619af55c892452cee3b90a545f0
change-id: 20240529-panthor-600520083b6b

Best regards,

Signature · 1 line
Quentin Schulz <[email protected]>
#1 lore raw

PATCH 1/3 linux-firmware: update to 20240513

From: Quentin Schulz <[email protected]>

Update the linux-firmware recipe to the most recent upstream tag.

LICENSE.amdgpu md5 checksum changed because they bumped the Copyright year[1].

Some of qcom-sdm845-modem files got replaced by a symlink to their counterpart in ath10k/WCN3990/hw1.0/. The same happened to files in qcom-qcm2290-wifi, but to ath10k/WCN3990/hw1.0/qcm2290/. Finally, qcom-qrb4210-wifi also got its file symlinked to ath10k/WCN3990/hw1.0/qrb4210/ which in turn is a symlink to ath10k/WCN3990/hw1.0/qcm2290/.[2] This meant that qrb4210-wifi now RDEPENDS on qcm2290-wifi for the target of the links to be present when installing it, and also that sdm845-modem and qcm2290-wifi packages have to be before the ath10k catch-all package.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=9442c72e361c1e1130a19248598ad6ab5282ba09
[2] https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=650e88378e76d5fad3997a5398f1ade47a74d924

---
 ...ware_20240312.bb => linux-firmware_20240513.bb} | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)
meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20240312.bb +13 -9
similarity index 98%
rename from meta/recipes-kernel/linux-firmware/linux-firmware_20240312.bb
rename to meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb
index 13538afede..026e5dba00 100644
@@ -82,7 +82,7 @@ LICENSE = "\
 LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
                     file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
-                    file://LICENSE.amdgpu;md5=a2589a05ea5b6bd2b7f4f623c7e7a649 \
+                    file://LICENSE.amdgpu;md5=1433dfea38c97a2e563a248a863dcb94 \
                     file://LICENSE.amd-ucode;md5=6ca90c57f7b248de1e25c7f68ffc4698 \
                     file://LICENSE.amlogic_vdec;md5=dc44f59bf64a81643e500ad3f39a468a \
                     file://LICENSE.amphion_vpu;md5=2bcdc00527b2d0542bd92b52aaec2b60 \
@@ -154,7 +154,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
                     "
 # WHENCE checksum is defined separately to ease overriding it if
 # class-devupstream is selected.
-WHENCE_CHKSUM  = "514da1cd8b363373030f0c16749feb8d"
+WHENCE_CHKSUM  = "ae024b46fd393d199f66bbe1f3ff5254"
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
 # so that the license files will be copied from fetched source
@@ -241,7 +241,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
 # Pin this to the 20220509 release, override this in local.conf
 SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
 
-SRC_URI[sha256sum] = "b2327a54ad1897c828008caf63af5ee15469ba723a5016be58f2b44f07bd4b94"
+SRC_URI[sha256sum] = "9f05edb99668135d37cedc4fdd18aac2802dc9e4566e086e6c6c2e321f3ecc4e"
 
 inherit allarch
 
@@ -322,6 +322,7 @@ PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
              ${PN}-cnm-license ${PN}-cnm \
              ${PN}-atheros-license ${PN}-ar5523 ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k ${PN}-ath3k \
              ${PN}-carl9170 \
+             ${PN}-qcom-qrb4210-wifi ${PN}-qcom-sdm845-modem \
              ${PN}-ar3k-license ${PN}-ar3k ${PN}-ath10k-license ${PN}-ath10k ${PN}-ath11k ${PN}-ath12k ${PN}-qca \
              \
              ${PN}-imx-sdma-license ${PN}-imx-sdma-imx6q ${PN}-imx-sdma-imx7d \
@@ -384,13 +385,13 @@ PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
              ${PN}-qcom-apq8096-adreno ${PN}-qcom-apq8096-audio ${PN}-qcom-apq8096-modem \
              ${PN}-qcom-qcm2290-adreno ${PN}-qcom-qcm2290-audio ${PN}-qcom-qcm2290-modem ${PN}-qcom-qcm2290-wifi  \
              ${PN}-qcom-qrb4210-adreno ${PN}-qcom-qrb4210-audio ${PN}-qcom-qrb4210-compute \
-             ${PN}-qcom-qrb4210-modem ${PN}-qcom-qrb4210-wifi  \
+             ${PN}-qcom-qrb4210-modem \
              ${PN}-qcom-sc8280xp-lenovo-x13s-compat \
              ${PN}-qcom-sc8280xp-lenovo-x13s-audio \
              ${PN}-qcom-sc8280xp-lenovo-x13s-adreno \
              ${PN}-qcom-sc8280xp-lenovo-x13s-compute \
              ${PN}-qcom-sc8280xp-lenovo-x13s-sensors \
-             ${PN}-qcom-sdm845-adreno ${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute ${PN}-qcom-sdm845-modem \
+             ${PN}-qcom-sdm845-adreno ${PN}-qcom-sdm845-audio ${PN}-qcom-sdm845-compute \
              ${PN}-qcom-sdm845-thundercomm-db845c-sensors \
              ${PN}-qcom-sm8250-adreno ${PN}-qcom-sm8250-audio ${PN}-qcom-sm8250-compute \
              ${PN}-qcom-sm8250-thundercomm-rb5-sensors \
@@ -1419,12 +1420,12 @@ FILES:${PN}-qcom-apq8096-modem = "${nonarch_base_libdir}/firmware/qcom/apq8096/m
 FILES:${PN}-qcom-qcm2290-adreno = "${nonarch_base_libdir}/firmware/qcom/qcm2290/a702_zap.mbn"
 FILES:${PN}-qcom-qcm2290-audio = "${nonarch_base_libdir}/firmware/qcom/qcm2290/adsp*.*"
 FILES:${PN}-qcom-qcm2290-modem = "${nonarch_base_libdir}/firmware/qcom/qcm2290/modem*.*"
-FILES:${PN}-qcom-qcm2290-wifi = "${nonarch_base_libdir}/firmware/qcom/qcm2290/wlanmdsp.mbn"
+FILES:${PN}-qcom-qcm2290-wifi = "${nonarch_base_libdir}/firmware/qcom/qcm2290/wlanmdsp.mbn ${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/qcm2290/wlanmdsp.mbn"
 FILES:${PN}-qcom-qrb4210-adreno = "${nonarch_base_libdir}/firmware/qcom/qrb4210/a610_zap.mbn"
 FILES:${PN}-qcom-qrb4210-audio = "${nonarch_base_libdir}/firmware/qcom/qrb4210/adsp*.*"
 FILES:${PN}-qcom-qrb4210-compute = "${nonarch_base_libdir}/firmware/qcom/qrb4210/cdsp*.*"
 FILES:${PN}-qcom-qrb4210-modem = "${nonarch_base_libdir}/firmware/qcom/qrb4210/modem*.*"
-FILES:${PN}-qcom-qrb4210-wifi = "${nonarch_base_libdir}/firmware/qcom/qrb4210/wlanmdsp.mbn"
+FILES:${PN}-qcom-qrb4210-wifi = "${nonarch_base_libdir}/firmware/qcom/qrb4210/wlanmdsp.mbn ${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/qrb4210/wlanmdsp.mbn"
 FILES:${PN}-qcom-sc8280xp-lenovo-x13s-compat = "${nonarch_base_libdir}/firmware/qcom/LENOVO/21BX"
 FILES:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/*adsp*.* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/battmgr.jsn ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/audioreach-tplg.bin ${nonarch_base_libdir}/firmware/qcom/sc8280xp/SC8280XP-LENOVO-X13S-tplg.bin"
 FILES:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn"
@@ -1433,7 +1434,8 @@ FILES:${PN}-qcom-sc8280xp-lenovo-x13s-sensors = "${nonarch_base_libdir}/firmware
 FILES:${PN}-qcom-sdm845-adreno = "${nonarch_base_libdir}/firmware/qcom/sdm845/a630*.*"
 FILES:${PN}-qcom-sdm845-audio = "${nonarch_base_libdir}/firmware/qcom/sdm845/adsp*.*"
 FILES:${PN}-qcom-sdm845-compute = "${nonarch_base_libdir}/firmware/qcom/sdm845/cdsp*.*"
-FILES:${PN}-qcom-sdm845-modem = "${nonarch_base_libdir}/firmware/qcom/sdm845/mba.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/modem*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/wlanmdsp.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/notice.txt_wlanmdsp"
+FILES:${PN}-qcom-sdm845-modem = "${nonarch_base_libdir}/firmware/qcom/sdm845/mba.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/modem*.* ${nonarch_base_libdir}/firmware/qcom/sdm845/wlanmdsp.mbn ${nonarch_base_libdir}/firmware/qcom/sdm845/notice.txt_wlanmdsp \
+                                 ${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/wlanmdsp.mbn ${nonarch_base_libdir}/firmware/ath10k/WCN3990/hw1.0/notice.txt_wlanmdsp"
 FILES:${PN}-qcom-sdm845-thundercomm-db845c-sensors = "${nonarch_base_libdir}/firmware/qcom/sdm845/Thundercomm/db845c/slpi*.*"
 FILES:${PN}-qcom-sm8250-adreno = "${nonarch_base_libdir}/firmware/qcom/sm8250/a650*.*"
 FILES:${PN}-qcom-sm8250-audio = "${nonarch_base_libdir}/firmware/qcom/sm8250/adsp*.*"
@@ -1468,7 +1470,9 @@ RDEPENDS:${PN}-qcom-qrb4210-adreno = "${PN}-qcom-license"
 RDEPENDS:${PN}-qcom-qrb4210-audio = "${PN}-qcom-license"
 RDEPENDS:${PN}-qcom-qrb4210-compute = "${PN}-qcom-license"
 RDEPENDS:${PN}-qcom-qrb4210-modem = "${PN}-qcom-license"
-RDEPENDS:${PN}-qcom-qrb4210-wifi = "${PN}-qcom-license"
+# Only symlinks in qcom-qrb4210-wifi, firmware is in qcom-qcm2290-wifi
+# c.f. https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=650e88378e76d5fad3997a5398f1ade47a74d924
+RDEPENDS:${PN}-qcom-qrb4210-wifi = "${PN}-qcom-license ${PN}-qcom-qcm2290-wifi"
 RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${PN}-qcom-license"
 RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${PN}-qcom-license"
 RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-compute = "${PN}-qcom-license"
Signature · 1 line
2.45.1
#2 lore raw

PATCH 2/3 mesa: upgrade 24.0.7 -> 24.1.0

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

Changelog:
https://docs.mesa3d.org/relnotes/24.1.0.html

0001-drisw-fix-build-without-dri3.patch was merged in
https://gitlab.freedesktop.org/mesa/mesa/-/commit/bdb59a3941c9dadfcbe1b9b6569f5c8a994e139f

0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch was merged in
https://gitlab.freedesktop.org/mesa/mesa/-/commit/d7b877598f1838c58c6367817e83832c230f7e0b

---
 .../files/0001-drisw-fix-build-without-dri3.patch  | 58 ----------------------
 ...ext-don-t-try-zink-if-not-enabled-in-mesa.patch | 42 ----------------
 .../mesa/{mesa-gl_24.0.7.bb => mesa-gl_24.1.0.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc                |  4 +-
 .../mesa/{mesa_24.0.7.bb => mesa_24.1.0.bb}        |  0
 5 files changed, 1 insertion(+), 103 deletions(-)
meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch deleted +0 -58
deleted file mode 100644
index ab16152090..0000000000
@@ -1,58 +0,0 @@
-From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001
-From: Romain Naour <[email protected]>
-Date: Tue, 6 Feb 2024 09:47:09 +0100
-Subject: [PATCH 1/2] drisw: fix build without dri3
-
-commit 1887368df41 ("glx/sw: check for modifier support in the kopper path")
-added dri3_priv.h header and dri3_check_multibuffer() function in drisw that
-can be build without dri3.
-
-  i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver':
-  drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer'
-  collect2: error: ld returned 1 exit status
-
-Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using
-dri3_check_multibuffer().
-
-Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path")
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
-Signed-off-by: Romain Naour <[email protected]>
-Signed-off-by: Khem Raj <[email protected]>
----
- src/glx/drisw_glx.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
-index 3d3f752..4b19e2d 100644
---- a/src/glx/drisw_glx.c
-+++ b/src/glx/drisw_glx.c
-@@ -32,7 +32,9 @@
- #include <dlfcn.h>
- #include "dri_common.h"
- #include "drisw_priv.h"
-+#ifdef HAVE_DRI3
- #include "dri3_priv.h"
-+#endif
- #include <X11/extensions/shmproto.h>
- #include <assert.h>
- #include <vulkan/vulkan_core.h>
-@@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
-        goto handle_error;
-    }
- 
-+#ifdef HAVE_DRI3
-    if (pdpyp->zink) {
-       bool err;
-       psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
-@@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
-          goto handle_error;
-       }
-    }
-+#endif
- 
-    glx_config_destroy_list(psc->base.configs);
-    psc->base.configs = configs;
--- 
-2.44.0
-
meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-graphics/mesa/mesa-gl_24.1.0.bb renamed from meta/recipes-graphics/mesa/mesa-gl_24.0.7.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_24.0.7.bb
rename to meta/recipes-graphics/mesa/mesa-gl_24.1.0.bb
meta/recipes-graphics/mesa/mesa.inc +1 -3
index 2581ccb120..cb1c9b7b34 100644
@@ -16,12 +16,10 @@ PE = "2"
 
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
-           file://0001-drisw-fix-build-without-dri3.patch \
-           file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
            file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
 "
 
-SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a"
+SRC_URI[sha256sum] = "b7eac8c79244806b1c276eeeacc329e4a5b31a370804c4b0c7cd16837783f78b"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
meta/recipes-graphics/mesa/mesa_24.1.0.bb renamed from meta/recipes-graphics/mesa/mesa_24.0.7.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_24.0.7.bb
rename to meta/recipes-graphics/mesa/mesa_24.1.0.bb
Signature · 1 line
2.45.1
#3 lore raw

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

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

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

---
 meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb +11 -0
index 026e5dba00..4a87105d98 100644
@@ -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"
Signature · 1 line
2.45.1
#4 lore raw

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

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

Quoted 61 lines · Quentin Schulz

From: Quentin Schulz <[email protected]>

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

---
  meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb | 11 +++++++++++
  1 file changed, 11 insertions(+)
meta/recipes-kernel/linux-firmware/linux-firmware_20240513.bb +11 -0
index 026e5dba00..4a87105d98 100644
@@ -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"
#5 lore raw

Re: [OE-core] [PATCH 3/3] mesa: add new package for Mali CSFFW Valhall firmware

Quoted 5 lines · Quentin Schulz via lists.openembedded.org

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

#6 lore raw

Re: [OE-core] [PATCH 3/3] mesa: add new package for Mali CSFFW Valhall firmware

Hi Richard,

Quoted 4 lines · Richard Purdie
Quoted 2 lines · Quentin Schulz via lists.openembedded.org

Hi all,

Quoted 8 lines
Quoted 3 lines

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

#7 lore raw

Re: [OE-core] [PATCH 3/3] mesa: add new package for Mali CSFFW Valhall firmware

Hi Quentin,

Quoted 3 lines · Quentin Schulz

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!

Quoted 5 lines

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.

Quoted 11 lines

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