summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-graphics')
-rw-r--r--meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb12
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-fix-LLVM-include-of-Host-h-moved-to-TargetParser.patch65
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-17.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-18-and-19.patch53
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gbm-backend-fix-gbm-compile-without-dri.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson.build-check-for-all-linux-host_os-combinations.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-util-format-Check-for-NEON-before-using-it.patch (renamed from meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch)0
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-Update-lp_bld_misc.cpp-to-support-llvm-19.patch38
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-drisw-fix-build-without-dri3.patch57
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallium-Fix-build-with-llvm-17.patch40
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallivm-Call-StringMapIterator-from-llvm-scope.patch31
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch25
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch43
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch41
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc370
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb11
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb52
-rw-r--r--meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb24
-rw-r--r--meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.2.6643903.bb154
-rw-r--r--meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb25
23 files changed, 1012 insertions, 29 deletions
diff --git a/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb b/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb
index 807f421c..bd7cf015 100644
--- a/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb
+++ b/meta-ti-bsp/recipes-graphics/libgal/ti-gc320-libs_5.0.11.p7.bb
@@ -1,4 +1,4 @@
1DESCRIPTION = "Userspace libraries for GC320 chipset on TI SoCs" 1SUMMARY = "Userspace libraries for GC320 chipset on TI SoCs"
2HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-libs" 2HOMEPAGE = "https://git.ti.com/graphics/ti-gc320-libs"
3LICENSE = "TI-TSPA" 3LICENSE = "TI-TSPA"
4LIC_FILES_CHKSUM = "file://Manifest.html;md5=a9121e8936ace09820d23f7626daaca5" 4LIC_FILES_CHKSUM = "file://Manifest.html;md5=a9121e8936ace09820d23f7626daaca5"
@@ -14,7 +14,7 @@ CLEANBROKEN = "1"
14BRANCH = "ti-${PV}" 14BRANCH = "ti-${PV}"
15 15
16SRC_URI = "git://git.ti.com/git/graphics/ti-gc320-libs.git;protocol=https;branch=${BRANCH}" 16SRC_URI = "git://git.ti.com/git/graphics/ti-gc320-libs.git;protocol=https;branch=${BRANCH}"
17SRCREV = "c0afab259de59909cfe74c01f3f7fbaa147f94b5" 17SRCREV = "85c175e8425c33dda6e272aeb45afe0f69a79096"
18 18
19RRECOMMENDS:${PN} = "ti-gc320-driver" 19RRECOMMENDS:${PN} = "ti-gc320-driver"
20 20
@@ -34,8 +34,6 @@ TARGET_PRODUCT = "jacinto6evm"
34 34
35PR = "r3" 35PR = "r3"
36 36
37S = "${WORKDIR}/git"
38
39EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} LIBDIR=${libdir}" 37EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} LIBDIR=${libdir}"
40 38
41do_install() { 39do_install() {
@@ -43,4 +41,8 @@ do_install() {
43 chown -R root:root ${D} 41 chown -R root:root ${D}
44} 42}
45 43
46INSANE_SKIP:${PN} += "ldflags" 44PACKAGES = "${PN} ${PN}-dev"
45FILES:${PN} += "${libdir}/libGAL.so"
46FILES:${PN}-dev = "/usr/include"
47
48INSANE_SKIP:${PN} += "ldflags already-stripped dev-so"
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-fix-LLVM-include-of-Host-h-moved-to-TargetParser.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-fix-LLVM-include-of-Host-h-moved-to-TargetParser.patch
new file mode 100644
index 00000000..7d4fe078
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-fix-LLVM-include-of-Host-h-moved-to-TargetParser.patch
@@ -0,0 +1,65 @@
1From bb2db56ffec6e527d88751f75117ae690227cd6c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= <kai@dev.carbon-project.org>
3Date: Sat, 11 Feb 2023 18:38:01 +0100
4Subject: [PATCH] fix: gallivm: fix LLVM #include of Host.h, moved to
5 TargetParser
6
7Upstream moved Host.h from Support to TargetParser in LLVM 17.
8
9This shouldn't lead to a FTBFS, since there is a forwarding include left
10behind. Sadly the added deprecation warning #pragma is invalid and thus
11causes a build failure right away. But since we would have to follow the
12move anyway in the future, just do it right away.
13
14Reference: https://github.com/llvm/llvm-project/commit/d768bf994f508d7eaf9541a568be3d71096febf5
15Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
16Closes: #8275
17Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21263>
18
19Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/bb2db56ffec6e527d88751f75117ae690227cd6c]
20
21---
22 src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 7 ++++++-
23 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 +++-
24 2 files changed, 9 insertions(+), 2 deletions(-)
25
26diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
27index 54bc5d5ada36c..f78f04f042be8 100644
28--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
29+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
30@@ -35,9 +35,14 @@
31 #include <llvm-c/Disassembler.h>
32 #include <llvm/Support/raw_ostream.h>
33 #include <llvm/Support/Format.h>
34-#include <llvm/Support/Host.h>
35 #include <llvm/IR/Module.h>
36
37+#if LLVM_VERSION_MAJOR >= 17
38+#include <llvm/TargetParser/Host.h>
39+#else
40+#include <llvm/Support/Host.h>
41+#endif
42+
43 #include "util/u_math.h"
44 #include "util/u_debug.h"
45
46diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
47index 334c13530394b..5e7a30a6cc2e3 100644
48--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
49+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
50@@ -60,7 +60,11 @@
51 #include <llvm/Analysis/TargetLibraryInfo.h>
52 #include <llvm/ExecutionEngine/SectionMemoryManager.h>
53 #include <llvm/Support/CommandLine.h>
54+#if LLVM_VERSION_MAJOR >= 17
55+#include <llvm/TargetParser/Host.h>
56+#else
57 #include <llvm/Support/Host.h>
58+#endif
59 #include <llvm/Support/PrettyStackTrace.h>
60 #include <llvm/ExecutionEngine/ObjectCache.h>
61 #include <llvm/Support/TargetSelect.h>
62
63--
64GitLab
65
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch
index 905fad04..905fad04 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
index f0775176..f0775176 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-17.patch
index bdfe7bb8..bdfe7bb8 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-17.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-18-and-19.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-18-and-19.patch
new file mode 100644
index 00000000..37888c34
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gallium-Fix-build-with-llvm-18-and-19.patch
@@ -0,0 +1,53 @@
1From 6c5033bb01a3a1341d4db5007586a5f2e2727b0a Mon Sep 17 00:00:00 2001
2From: Ryan Eatmon <reatmon@ti.com>
3Date: Mon, 4 Nov 2024 13:37:29 -0600
4Subject: [PATCH] gallium: Fix build with llvm 18 and 19
5
6- CodeGenOpt::Level changed to CodeGenOoptLevel. [1]
7- llvm::sys::getHostCPUFeatures() now returns the features instead of
8modifying the passed in argument. [2]
9
10Upstream-Status: Backport [1][https://gitlab.freedesktop.org/mesa/mesa/-/commit/f79617fe804ea6524651ff1bc3a91098d3199179]
11Upstream-Status: Backport [2][https://gitlab.freedesktop.org/mesa/mesa/-/commit/fa9cd89a85b904615ebc11da609445b5b751e68d]
12
13Signed-off-by: Ryan Eatmon <reatmon@ti.com>
14---
15 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 14 ++++++++++++--
16 1 file changed, 12 insertions(+), 2 deletions(-)
17
18diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
19index 5e7a30a6cc2..dbc777e3096 100644
20--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
21+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
22@@ -368,7 +368,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
23 builder.setEngineKind(EngineKind::JIT)
24 .setErrorStr(&Error)
25 .setTargetOptions(options)
26+#if LLVM_VERSION_MAJOR >= 18
27+ .setOptLevel((CodeGenOptLevel)OptLevel);
28+#else
29 .setOptLevel((CodeGenOpt::Level)OptLevel);
30+#endif
31
32 #ifdef _WIN32
33 /*
34@@ -392,8 +396,14 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
35 * which allows us to enable/disable code generation based
36 * on the results of cpuid on these architectures.
37 */
38- llvm::StringMap<bool> features;
39- llvm::sys::getHostCPUFeatures(features);
40+ #if LLVM_VERSION_MAJOR >= 19
41+ /* llvm-19+ returns StringMap from getHostCPUFeatures.
42+ */
43+ auto features = llvm::sys::getHostCPUFeatures();
44+ #else
45+ llvm::StringMap<bool> features;
46+ llvm::sys::getHostCPUFeatures(features);
47+ #endif
48
49 for (StringMapIterator<bool> f = features.begin();
50 f != features.end();
51--
522.17.1
53
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gbm-backend-fix-gbm-compile-without-dri.patch
index 289ff032..289ff032 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-gbm-backend-fix-gbm-compile-without-dri.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
index 35bd0ea1..35bd0ea1 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson.build-check-for-all-linux-host_os-combinations.patch
index f0c1de46..f0c1de46 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-meson.build-check-for-all-linux-host_os-combinations.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-util-format-Check-for-NEON-before-using-it.patch
index 6eea5ed8..6eea5ed8 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-22.3.5/0001-util-format-Check-for-NEON-before-using-it.patch
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-Update-lp_bld_misc.cpp-to-support-llvm-19.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-Update-lp_bld_misc.cpp-to-support-llvm-19.patch
new file mode 100644
index 00000000..9e5bb342
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-Update-lp_bld_misc.cpp-to-support-llvm-19.patch
@@ -0,0 +1,38 @@
1From fa9cd89a85b904615ebc11da609445b5b751e68d Mon Sep 17 00:00:00 2001
2From: Satadru Pramanik <satadru@umich.edu>
3Date: Sat, 5 Oct 2024 13:35:52 +0000
4Subject: [PATCH] Update lp_bld_misc.cpp to support llvm-19+.
5
6Fixes #11896.
7cc: mesa-stable
8
9Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31533>
10Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/fa9cd89a85b904615ebc11da609445b5b751e68d]
11Signed-off-by: Randolph Sapp <rs@ti.com>
12---
13 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 10 ++++++++--
14 1 file changed, 8 insertions(+), 2 deletions(-)
15
16diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
17index 7975fcf1ac9..5b615d627ff 100644
18--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
19+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
20@@ -329,8 +329,14 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
21 * which allows us to enable/disable code generation based
22 * on the results of cpuid on these architectures.
23 */
24- llvm::StringMap<bool> features;
25- llvm::sys::getHostCPUFeatures(features);
26+ #if LLVM_VERSION_MAJOR >= 19
27+ /* llvm-19+ returns StringMap from getHostCPUFeatures.
28+ */
29+ auto features = llvm::sys::getHostCPUFeatures();
30+ #else
31+ llvm::StringMap<bool> features;
32+ llvm::sys::getHostCPUFeatures(features);
33+ #endif
34
35 for (llvm::StringMapIterator<bool> f = features.begin();
36 f != features.end();
37--
382.47.1
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-drisw-fix-build-without-dri3.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-drisw-fix-build-without-dri3.patch
new file mode 100644
index 00000000..9d662b34
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-drisw-fix-build-without-dri3.patch
@@ -0,0 +1,57 @@
1From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@smile.fr>
3Date: Tue, 6 Feb 2024 09:47:09 +0100
4Subject: [PATCH 1/2] drisw: fix build without dri3
5
6commit 1887368df41 ("glx/sw: check for modifier support in the kopper path")
7added dri3_priv.h header and dri3_check_multibuffer() function in drisw that
8can be build without dri3.
9
10 i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver':
11 drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer'
12 collect2: error: ld returned 1 exit status
13
14Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using
15dri3_check_multibuffer().
16
17Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path")
18
19Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
20Signed-off-by: Romain Naour <romain.naour@smile.fr>
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23 src/glx/drisw_glx.c | 4 ++++
24 1 file changed, 4 insertions(+)
25
26diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
27index 3d3f752..4b19e2d 100644
28--- a/src/glx/drisw_glx.c
29+++ b/src/glx/drisw_glx.c
30@@ -32,7 +32,9 @@
31 #include <dlfcn.h>
32 #include "dri_common.h"
33 #include "drisw_priv.h"
34+#ifdef HAVE_DRI3
35 #include "dri3_priv.h"
36+#endif
37 #include <X11/extensions/shmproto.h>
38 #include <assert.h>
39 #include <vulkan/vulkan_core.h>
40@@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
41 goto handle_error;
42 }
43
44+#ifdef HAVE_DRI3
45 if (pdpyp->zink) {
46 bool err;
47 psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
48@@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
49 goto handle_error;
50 }
51 }
52+#endif
53
54 glx_config_destroy_list(psc->base.configs);
55 psc->base.configs = configs;
56--
572.44.0
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallium-Fix-build-with-llvm-17.patch
new file mode 100644
index 00000000..738ff267
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallium-Fix-build-with-llvm-17.patch
@@ -0,0 +1,40 @@
1From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 23 Jun 2023 01:20:38 -0700
4Subject: [PATCH] gallium: Fix build with llvm 17
5
6These headers are not available for C files in llvm 17+
7and they seem to be not needed to compile after all with llvm 17
8so add conditions to exclude them for llvm >= 17
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13---
14 src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++-
15 1 file changed, 5 insertions(+), 1 deletion(-)
16
17diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
18index cd2108f..b1a4d03 100644
19--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
20+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
21@@ -46,15 +46,19 @@
22 #if GALLIVM_USE_NEW_PASS == 1
23 #include <llvm-c/Transforms/PassBuilder.h>
24 #elif GALLIVM_HAVE_CORO == 1
25+#if LLVM_VERSION_MAJOR < 17
26 #include <llvm-c/Transforms/Scalar.h>
27-#if LLVM_VERSION_MAJOR >= 7
28+#endif
29+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
30 #include <llvm-c/Transforms/Utils.h>
31 #endif
32 #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
33 #include <llvm-c/Transforms/IPO.h>
34 #endif
35+#if LLVM_VERSION_MAJOR < 17
36 #include <llvm-c/Transforms/Coroutines.h>
37 #endif
38+#endif
39
40 unsigned gallivm_perf = 0;
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallivm-Call-StringMapIterator-from-llvm-scope.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallivm-Call-StringMapIterator-from-llvm-scope.patch
new file mode 100644
index 00000000..1751df6f
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-gallivm-Call-StringMapIterator-from-llvm-scope.patch
@@ -0,0 +1,31 @@
1From d17338d403980e1932a42f5d11c2a1fb7b25127b Mon Sep 17 00:00:00 2001
2From: MastaG <mastag@gmail.com>
3Date: Wed, 3 Jul 2024 21:00:42 +0200
4Subject: [PATCH] gallivm: Call StringMapIterator from llvm:: scope
5
6Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11392
7Fixes: b035d9cab5a4 ("gallivm: use getHostCPUFeatures on x86/llvm-4.0+.")
8Reviewed-by: David Heidelberg <david@ixit.cz>
9Signed-off-by: David Heidelberg <david@ixit.cz>
10Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30009>
11Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/d17338d403980e1932a42f5d11c2a1fb7b25127b]
12Signed-off-by: Randolph Sapp <rs@ti.com>
13---
14 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
18index 95a8a6c6a08..f3c10652ed6 100644
19--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
20+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
21@@ -332,7 +332,7 @@ lp_build_fill_mattrs(std::vector<std::string> &MAttrs)
22 llvm::StringMap<bool> features;
23 llvm::sys::getHostCPUFeatures(features);
24
25- for (StringMapIterator<bool> f = features.begin();
26+ for (llvm::StringMapIterator<bool> f = features.begin();
27 f != features.end();
28 ++f) {
29 MAttrs.push_back(((*f).second ? "+" : "-") + (*f).first().str());
30--
312.47.1
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
new file mode 100644
index 00000000..35bd0ea1
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
@@ -0,0 +1,25 @@
1From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Jan 2020 15:23:47 -0800
4Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9---
10 src/util/u_atomic.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
14index 5a5eab4..e499516 100644
15--- a/src/util/u_atomic.c
16+++ b/src/util/u_atomic.c
17@@ -21,7 +21,7 @@
18 * IN THE SOFTWARE.
19 */
20
21-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
22+#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
23
24 #include <stdint.h>
25 #include <pthread.h>
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 00000000..964e0a44
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,43 @@
1From f2fe76d506f356de055b8eca83a7c9d0744a40af Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:04:49 -0800
4Subject: [PATCH] meson.build: check for all linux host_os combinations
5
6Make sure that we are also looking for our host_os combinations like
7linux-musl etc. when assuming support for DRM/KMS.
8
9Also delete a duplicate line.
10
11Upstream-Status: Pending
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-off-by: Alistair Francis <alistair@alistair23.me>
17
18---
19 meson.build | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/meson.build b/meson.build
23index 35cc5f1..9a49c0d 100644
24--- a/meson.build
25+++ b/meson.build
26@@ -128,7 +128,7 @@
27 # Only build shared_glapi if at least one OpenGL API is enabled
28 with_shared_glapi = with_shared_glapi and with_any_opengl
29
30-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system())
31+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system()) or host_machine.system().startswith('linux')
32
33 gallium_drivers = get_option('gallium-drivers')
34 if gallium_drivers.contains('auto')
35@@ -998,7 +998,7 @@
36 endif
37
38 # TODO: this is very incomplete
39-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm'].contains(host_machine.system())
40+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm'].contains(host_machine.system()) or host_machine.system().startswith('linux')
41 pre_args += '-D_GNU_SOURCE'
42 elif host_machine.system() == 'sunos'
43 pre_args += '-D__EXTENSIONS__'
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch
new file mode 100644
index 00000000..1203c446
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-24.0.1/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch
@@ -0,0 +1,41 @@
1From 62495ebb977866c52d5bed8499a547c49f0d9bc1 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@smile.fr>
3Date: Tue, 6 Feb 2024 09:47:10 +0100
4Subject: [PATCH 2/2] glxext: don't try zink if not enabled in mesa
5
6Commit 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
7added an automatic zink fallback even when the zink gallium is not
8enabled at build time.
9
10It leads to unexpected error log while loading drisw driver and
11zink is not installed on the rootfs:
12
13 MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so
14
15Fixes: 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
16
17Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
18Signed-off-by: Romain Naour <romain.naour@smile.fr>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 src/glx/glxext.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/src/glx/glxext.c b/src/glx/glxext.c
25index 05c825a..7a06aa9 100644
26--- a/src/glx/glxext.c
27+++ b/src/glx/glxext.c
28@@ -908,9 +908,11 @@ __glXInitialize(Display * dpy)
29 #endif /* HAVE_DRI3 */
30 if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false))
31 dpyPriv->dri2Display = dri2CreateDisplay(dpy);
32+#if defined(HAVE_ZINK)
33 if (!dpyPriv->dri3Display && !dpyPriv->dri2Display)
34 try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) &&
35 !getenv("GALLIUM_DRIVER");
36+#endif /* HAVE_ZINK */
37 }
38 #endif /* GLX_USE_DRM */
39 if (glx_direct)
40--
412.44.0
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc
new file mode 100644
index 00000000..45d5ada3
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr.inc
@@ -0,0 +1,370 @@
1# Copy of mesa.inc from OE-core before commit f9eb0468e45e ("mesa: upgrade 24.0.7 -> 25.0.2")
2
3SUMMARY = "A free implementation of the OpenGL API"
4DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \
5a system for rendering interactive 3D graphics. \
6A variety of device drivers allows Mesa to be used in many different environments \
7ranging from software emulation to complete hardware acceleration for modern GPUs. \
8Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \
9environment."
10
11HOMEPAGE = "http://mesa3d.org"
12BUGTRACKER = "https://bugs.freedesktop.org"
13SECTION = "x11"
14LICENSE = "MIT"
15LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
16
17PE = "2"
18
19SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
20 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
21 file://0001-drisw-fix-build-without-dri3.patch \
22 file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
23 file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
24 file://0001-amd-Include-missing-llvm-IR-header-Module.h.patch \
25 file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\
26"
27
28SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a"
29PV = "24.0.7"
30
31UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
32
33#because we cannot rely on the fact that all apps will use pkgconfig,
34#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
35do_install:append() {
36 # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
37 # So, check if EGL/eglplatform.h exists before running sed.
38 if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
39 sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
40 fi
41}
42
43DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
44DEPENDS:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-native', '', d)}"
45EXTRANATIVEPATH += "chrpath-native"
46PROVIDES = " \
47 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
48 ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \
49 ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
50 ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
51 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
52 virtual/mesa \
53 "
54
55inherit meson pkgconfig python3native gettext features_check
56
57BBCLASSEXTEND = "native nativesdk"
58
59ANY_OF_DISTRO_FEATURES = "opengl vulkan"
60
61PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
62
63# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
64# by default the upstream mesa sources build a debug release
65# here we assume the user will want a release build by default
66MESA_BUILD_TYPE ?= "release"
67def check_buildtype(d):
68 _buildtype = d.getVar('MESA_BUILD_TYPE')
69 if _buildtype not in ['release', 'debug']:
70 bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
71 if _buildtype == 'debug':
72 return 'debugoptimized'
73 return 'plain'
74MESON_BUILDTYPE = "${@check_buildtype(d)}"
75
76EXTRA_OEMESON = " \
77 -Dshared-glapi=enabled \
78 -Dglx-read-only-text=true \
79 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
80"
81
82EXTRA_OEMESON:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=system', '', d)}"
83EXTRA_OEMESON:append:class-native = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=enabled', '', d)}"
84
85def strip_comma(s):
86 return s.strip(',')
87
88PACKAGECONFIG = " \
89 gallium \
90 video-codecs \
91 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
92 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
93 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
94 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
95 ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
96"
97
98PACKAGECONFIG:append:class-native = " gallium-llvm r600"
99
100# "gbm" requires "opengl"
101PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
102
103X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
104# "x11" requires "opengl"
105PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
106PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
107
108PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
109
110# Vulkan drivers need dri3 enabled
111# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
112VULKAN_DRIVERS = ""
113VULKAN_DRIVERS:append:x86 = ",intel,amd"
114VULKAN_DRIVERS:append:x86-64 = ",intel,amd"
115# i686 is a 32 bit override for mesa-native
116VULKAN_DRIVERS:append:i686 = ",intel,amd"
117VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
118VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
119VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}"
120VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}"
121PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
122
123# mesa development and testing tools support, per driver
124TOOLS = ""
125TOOLS_DEPS = ""
126TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
127TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
128TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
129TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
130TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
131
132# dependencies for tools.
133TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
134
135# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
136# treatment in addition to the usual 'freedreno tools'.
137PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
138
139PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
140
141PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
142PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd"
143
144# "gles" requires "opengl"
145PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
146
147# "egl" requires "opengl"
148PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
149
150# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
151OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
152PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
153
154PACKAGECONFIG[broadcom] = ""
155PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
156PACKAGECONFIG[freedreno] = ""
157PACKAGECONFIG[kmsro] = ""
158PACKAGECONFIG[vc4] = ""
159PACKAGECONFIG[v3d] = ""
160PACKAGECONFIG[zink] = ""
161
162GALLIUMDRIVERS = "swrast"
163# gallium swrast was found to crash Xorg on startup in x32 qemu
164GALLIUMDRIVERS:x86-x32 = ""
165GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
166GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
167# i686 is a 32 bit override for mesa-native
168GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
169
170GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
171GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
172GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
173GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
174GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
175GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
176
177# radeonsi requires LLVM
178GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
179GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
180GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
181GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
182# i686 is a 32 bit override for mesa-native
183GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
184
185PACKAGECONFIG[r600] = ""
186PACKAGECONFIG[virgl] = ""
187
188GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
189GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
190GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
191
192PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
193PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
194PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
195PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
196PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
197
198PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
199
200PACKAGECONFIG[lima] = ""
201GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
202
203PACKAGECONFIG[panfrost] = ""
204GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
205
206PACKAGECONFIG[tegra] = ""
207GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,nouveau', '', d)}"
208
209PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
210
211PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
212
213PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
214
215PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
216
217PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors"
218
219VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}"
220PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''"
221
222# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
223FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer"
224
225CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS"
226CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS"
227
228# Remove the mesa dependency on mesa-dev, as mesa is empty
229DEV_PKG_DEPENDENCY = ""
230
231# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
232# Add a dependency so the GLES3 dev package is associated with its implementation.
233RPROVIDES:libgles2-mesa += "libgles3-mesa"
234RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev"
235
236RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
237
238PACKAGES =+ "libegl-mesa libegl-mesa-dev \
239 libosmesa libosmesa-dev \
240 libgl-mesa libgl-mesa-dev \
241 libglx-mesa libglx-mesa-dev \
242 libglapi libglapi-dev \
243 libgbm libgbm-dev \
244 libgles1-mesa libgles1-mesa-dev \
245 libgles2-mesa libgles2-mesa-dev \
246 libopencl-mesa libopencl-mesa-dev \
247 libxatracker libxatracker-dev \
248 mesa-megadriver mesa-vulkan-drivers \
249 mesa-vdpau-drivers mesa-tools \
250 "
251
252do_install:append () {
253 # Drivers never need libtool .la files
254 rm -f ${D}${libdir}/dri/*.la
255 rm -f ${D}${libdir}/egl/*.la
256 rm -f ${D}${libdir}/gallium-pipe/*.la
257 rm -f ${D}${libdir}/gbm/*.la
258
259 # libwayland-egl has been moved to wayland 1.15+
260 rm -f ${D}${libdir}/libwayland-egl*
261 rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
262}
263
264do_install:append:class-native () {
265 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then
266 install -d ${D}${bindir}
267 install -m0755 ${B}/src/intel/compiler/intel_clc ${D}${bindir}
268 fi
269}
270
271# For the packages that make up the OpenGL interfaces, inject variables so that
272# they don't get Debian-renamed (which would remove the -mesa suffix), and
273# RPROVIDEs/RCONFLICTs on the generic libgl name.
274python __anonymous() {
275 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
276 suffix = ""
277 if "-native" in d.getVar("PN"):
278 suffix = "-native"
279 for p in (("egl", "libegl", "libegl1"),
280 ("opengl", "libgl", "libgl1"),
281 ("glvnd", "libglx",),
282 ("gles", "libgles1", "libglesv1-cm1"),
283 ("gles", "libgles2", "libglesv2-2", "libgles3"),
284 ("opencl", "libopencl",)):
285 if not p[0] in pkgconfig:
286 continue
287 mlprefix = d.getVar("MLPREFIX")
288 fullp = mlprefix + p[1] + "-mesa" + suffix
289 mlprefix = d.getVar("MLPREFIX")
290 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
291 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
292 d.appendVar("RREPLACES:" + fullp, pkgs)
293 d.appendVar("RPROVIDES:" + fullp, pkgs)
294 d.appendVar("RCONFLICTS:" + fullp, pkgs)
295
296 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
297
298 # For -dev, the first element is both the Debian and original name
299 fullp = mlprefix + p[1] + "-mesa-dev" + suffix
300 pkgs = " " + mlprefix + p[1] + "-dev" + suffix
301 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
302 d.appendVar("RREPLACES:" + fullp, pkgs)
303 d.appendVar("RPROVIDES:" + fullp, pkgs)
304 d.appendVar("RCONFLICTS:" + fullp, pkgs)
305}
306
307python mesa_populate_packages() {
308 pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
309 for pkg in pkgs:
310 d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
311 d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
312 d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
313
314 import re
315 dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
316 if os.path.isdir(dri_drivers_root):
317 dri_pkgs = sorted(os.listdir(dri_drivers_root))
318 lib_name = d.expand("${MLPREFIX}mesa-megadriver")
319 for p in dri_pkgs:
320 m = re.match(r'^(.*)_dri\.so$', p)
321 if m:
322 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
323 d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
324 d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
325 d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
326
327 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
328 do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
329}
330
331PACKAGESPLITFUNCS =+ "mesa_populate_packages"
332
333PACKAGES_DYNAMIC += "^mesa-driver-.*"
334PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
335
336FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
337FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
338FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
339FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
340FILES:libgbm = "${libdir}/libgbm.so.*"
341FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
342FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
343FILES:libgl-mesa = "${libdir}/libGL.so.*"
344FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
345FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
346FILES:libglapi = "${libdir}/libglapi.so.*"
347FILES:libosmesa = "${libdir}/libOSMesa.so.*"
348FILES:libxatracker = "${libdir}/libxatracker.so.*"
349
350FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
351FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
352FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
353FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
354FILES:libglx-mesa-dev = "${libdir}/libGLX*.*"
355FILES:libglapi-dev = "${libdir}/libglapi.*"
356FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
357FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${includedir}/GLES3 ${libdir}/pkgconfig/glesv2.pc"
358FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
359FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
360FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
361 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
362 ${libdir}/pkgconfig/xatracker.pc"
363# catch all to get all the tools and data
364FILES:${PN}-tools = "${bindir} ${datadir}"
365ALLOW_EMPTY:${PN}-tools = "1"
366
367# Fix upgrade path from mesa to mesa-megadriver
368RREPLACES:mesa-megadriver = "mesa"
369RCONFLICTS:mesa-megadriver = "mesa"
370RPROVIDES:mesa-megadriver = "mesa"
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb
index 5abd0793..2f160141 100644
--- a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb
@@ -2,9 +2,9 @@
2# upstream yet. This allows us to build the shims we need without completely 2# upstream yet. This allows us to build the shims we need without completely
3# clobbering mesa. 3# clobbering mesa.
4 4
5require recipes-graphics/mesa/mesa.inc 5require recipes-graphics/mesa/mesa-pvr.inc
6 6
7SUMMARY += " (with PowerVR support for TI platforms)" 7SUMMARY += " (with PowerVR for TI parts)"
8 8
9LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" 9LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
10 10
@@ -19,16 +19,17 @@ SRC_URI = " \
19 file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \ 19 file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
20 file://0001-gallium-Fix-build-with-llvm-17.patch \ 20 file://0001-gallium-Fix-build-with-llvm-17.patch \
21 file://0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch \ 21 file://0001-fix-gallivm-limit-usage-of-LLVMContextSetOpaquePoint.patch \
22 file://0001-fix-gallivm-fix-LLVM-include-of-Host-h-moved-to-TargetParser.patch \
23 file://0001-gallium-Fix-build-with-llvm-18-and-19.patch \
22" 24"
23 25
24S = "${WORKDIR}/git"
25
26PACKAGECONFIG:append = " \ 26PACKAGECONFIG:append = " \
27 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \ 27 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
28 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \ 28 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
29" 29"
30 30
31SRCREV = "1be98ba80452ebe38546a7fca26b5a70f2629083" 31SRCREV = "c9f0919367589b38f5682183846de9d60eec082d"
32PV = "22.3.5"
32 33
33PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" 34PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
34PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," 35PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb
new file mode 100644
index 00000000..e4f99d36
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_24.0.1.bb
@@ -0,0 +1,52 @@
1# PowerVR Graphics require several patches that have not made their way
2# upstream yet. This allows us to build the shims we need without completely
3# clobbering mesa.
4
5require recipes-graphics/mesa/mesa-pvr.inc
6
7SUMMARY += " (with PowerVR for TI parts)"
8
9LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
10
11BRANCH = "powervr/${PV}"
12
13SRC_URI = " \
14 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
15 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
16 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
17 file://0001-gallium-Fix-build-with-llvm-17.patch \
18 file://0001-drisw-fix-build-without-dri3.patch \
19 file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
20 file://0001-gallivm-Call-StringMapIterator-from-llvm-scope.patch \
21 file://0001-Update-lp_bld_misc.cpp-to-support-llvm-19.patch \
22"
23
24PACKAGECONFIG:append = " \
25 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
26 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
27"
28
29SRCREV = "82e6a9293c476267417c5b6b906b01fb73a34e38"
30PV = "24.0.1"
31
32PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
33PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
34PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
35
36
37PACKAGE_ARCH = "${MACHINE_ARCH}"
38
39GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
40GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
41
42VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
43
44do_install:append () {
45 # remove pvr custom pkgconfig
46 rm -rf ${D}${datadir}/pkgconfig
47}
48
49FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml"
50FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so"
51
52RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
index a0a9a295..5dc6c211 100644
--- a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.3.6512818.bb
@@ -1,7 +1,7 @@
1DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs" 1SUMMARY = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
2HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs" 2HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
3LICENSE = "TI-TFL" 3LICENSE = "TI-TFL"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" 4LIC_FILES_CHKSUM = "file://git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
5 5
6inherit bin_package 6inherit bin_package
7 7
@@ -12,10 +12,10 @@ COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s"
12 12
13PR = "r3" 13PR = "r3"
14 14
15BRANCH = "linuxws/scarthgap/k6.6/${PV}" 15BRANCH = "linuxws/kirkstone/k6.1/${PV}"
16SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" 16SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
17SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199" 17SRCREV = "0b9e64254269be2fa95c4f3e1dd925d6e4d58199"
18S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}" 18S:append = "/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
19 19
20TARGET_PRODUCT:j721e = "j721e_linux" 20TARGET_PRODUCT:j721e = "j721e_linux"
21TARGET_PRODUCT:j721s2 = "j721s2_linux" 21TARGET_PRODUCT:j721s2 = "j721s2_linux"
@@ -44,7 +44,7 @@ PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}"
44def get_file_list(package_list_var, d): 44def get_file_list(package_list_var, d):
45 file_list = [] 45 file_list = []
46 package_list = d.getVar(package_list_var) 46 package_list = d.getVar(package_list_var)
47 prefix = f"{d.getVar('S')}/" 47 prefix = f"{d.getVar('D')}/"
48 if package_list: 48 if package_list:
49 for package in package_list.split(): 49 for package in package_list.split():
50 package_file_string = d.getVar(f"FILES:{package}") 50 package_file_string = d.getVar(f"FILES:{package}")
@@ -53,7 +53,7 @@ def get_file_list(package_list_var, d):
53 file_list.append(f"{prefix}{package_file}") 53 file_list.append(f"{prefix}{package_file}")
54 return " ".join(file_list) 54 return " ".join(file_list)
55 55
56do_install:prepend() { 56do_install:append() {
57 if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then 57 if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then
58 for file in ${@get_file_list('GLES_PACKAGES', d)}; do 58 for file in ${@get_file_list('GLES_PACKAGES', d)}; do
59 rm -rf ${file} 59 rm -rf ${file}
@@ -70,13 +70,13 @@ do_install:prepend() {
70 done 70 done
71 fi 71 fi
72 if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then 72 if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
73 if [ -e ${S}/lib/firmware ]; then 73 if [ -e ${D}/lib/firmware ]; then
74 mv ${S}/lib/firmware ${S}${nonarch_base_libdir} 74 mv ${D}/lib/firmware ${D}${nonarch_base_libdir}
75 fi 75 fi
76 fi 76 fi
77 77
78 # clean up any empty directories 78 # clean up any empty directories
79 find "${S}" -empty -type d -delete 79 find "${D}" -empty -type d -delete
80} 80}
81 81
82GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue" 82GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue"
@@ -109,7 +109,7 @@ python __anonymous() {
109 mlprefix = d.getVar("MLPREFIX") 109 mlprefix = d.getVar("MLPREFIX")
110 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) 110 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
111 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") 111 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
112 d.setVar("INSANE_SKIP:" + fullp, "dev-so") 112 d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
113 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix) 113 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
114} 114}
115 115
@@ -129,10 +129,12 @@ RDEPENDS:libopencl-rogue += "opencl-icd-loader"
129RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools" 129RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
130FILES:libopencl-rogue-tools += "${bindir}/ocl*" 130FILES:libopencl-rogue-tools += "${bindir}/ocl*"
131DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1" 131DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
132INSANE_SKIP:libopencl-rogue-tools = "ldflags"
132 133
133# optional tools and tests 134# optional tools and tests
134FILES:${PN}-tools = "${bindir}/" 135FILES:${PN}-tools = "${bindir}/"
135RDEPENDS:${PN}-tools = "python3-core ${PN}" 136RDEPENDS:${PN}-tools = "python3-core ${PN}"
137INSANE_SKIP:${PN}-tools = "ldflags"
136 138
137# required firmware 139# required firmware
138FILES:${PN}-firmware = "${base_libdir}/firmware/*" 140FILES:${PN}-firmware = "${base_libdir}/firmware/*"
@@ -142,4 +144,4 @@ RRECOMMENDS:${PN} += " \
142 ${PN}-tools \ 144 ${PN}-tools \
143" 145"
144 146
145INSANE_SKIP:${PN} += "already-stripped dev-so" 147INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.2.6643903.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.2.6643903.bb
new file mode 100644
index 00000000..949c2d5d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.2.6643903.bb
@@ -0,0 +1,154 @@
1SUMMARY = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
2HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
3LICENSE = "TI-TFL"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
5
6PACKAGE_ARCH = "${MACHINE_ARCH}"
7COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|j742s2|am62xx|am62pxx|j722s"
8
9PR = "r4"
10
11BRANCH = "linuxws/scarthgap/k6.12/${PV}"
12SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
13SRCREV = "1ed9ee185cd876200e6747192854015b8e94a7b0"
14
15TARGET_PRODUCT:j721e = "j721e_linux"
16TARGET_PRODUCT:j721s2 = "j721s2_linux"
17TARGET_PRODUCT:j784s4 = "j784s4_linux"
18TARGET_PRODUCT:j742s2 = "j784s4_linux"
19TARGET_PRODUCT:am62xx = "am62_linux"
20TARGET_PRODUCT:am62pxx = "am62p_linux"
21TARGET_PRODUCT:j722s = "j722s_linux"
22PVR_BUILD = "release"
23PVR_WS = "lws-generic"
24
25RDEPENDS:${PN} = " \
26 libdrm \
27 ti-img-rogue-driver \
28 ${PN}-firmware \
29"
30
31PACKAGECONFIG ?= " \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \
33 ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \
34"
35
36PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}"
37PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}"
38PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}"
39
40def get_file_list(package_list_var, d):
41 file_list = []
42 package_list = d.getVar(package_list_var)
43 prefix = f"{d.getVar('D')}/"
44 if package_list:
45 for package in package_list.split():
46 package_file_string = d.getVar(f"FILES:{package}")
47 if package_file_string:
48 for package_file in package_file_string.split():
49 file_list.append(f"{prefix}{package_file}")
50 return " ".join(file_list)
51
52EXTRA_OEMAKE += 'BUILD=${PVR_BUILD} TARGET_PRODUCT=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
53
54do_configure[noexec] = "1"
55do_compile[noexec] = "1"
56do_install() {
57 oe_runmake 'DESTDIR=${D}' install
58 if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then
59 for file in ${@get_file_list('GLES_PACKAGES', d)}; do
60 rm -rf ${file}
61 done
62 fi
63 if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then
64 for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do
65 rm -rf ${file}
66 done
67 fi
68 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then
69 for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do
70 rm -rf ${file}
71 done
72 fi
73 if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
74 if [ -e ${D}/lib/firmware ]; then
75 mv ${D}/lib/firmware ${D}${nonarch_base_libdir}
76 fi
77 fi
78
79 # clean up any empty directories
80 find "${D}" -empty -type d -delete
81
82 # fix permissions
83 chown -R root:root "${D}"
84}
85
86GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue"
87VULKAN_PACKAGES = "libvk-rogue"
88OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools"
89
90PACKAGES = " \
91 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \
92 ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \
93 ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \
94 ${PN}-tools \
95 ${PN}-firmware \
96 ${PN} \
97"
98
99# Inject variables so that packages don't get Debian-renamed (which would
100# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic
101# libgl name to prevent colliding with swrast libs
102python __anonymous() {
103 suffix = ""
104 if "-native" in d.getVar("PN"):
105 suffix = "-native"
106 for p in (("vulkan", "libvk",),
107 ("gles", "libgles1", "libglesv1-cm1"),
108 ("gles", "libgles2", "libglesv2-2"),
109 ("gles", "libgles3",),
110 ("opencl", "libopencl",)):
111 mlprefix = d.getVar("MLPREFIX")
112 fullp = mlprefix + p[1] + "-rogue" + suffix
113 mlprefix = d.getVar("MLPREFIX")
114 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
115 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
116 d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags")
117 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
118}
119
120# gles specific shared objects
121FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*"
122FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*"
123RDEPENDS:libgles1-rogue += "mesa-megadriver"
124RDEPENDS:libgles2-rogue += "mesa-megadriver"
125
126# vulkan specific shared objects and configs
127FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan"
128RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm"
129
130# opencl specific shared objects and configs
131FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL"
132RDEPENDS:libopencl-rogue += "opencl-icd-loader"
133RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
134FILES:libopencl-rogue-tools += "${bindir}/ocl*"
135DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
136INSANE_SKIP:libopencl-rogue-tools = "ldflags"
137
138# optional tools and tests
139FILES:${PN}-tools = "${bindir}/"
140RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}"
141INSANE_SKIP:${PN}-tools = "ldflags"
142
143# required firmware
144FILES:${PN}-firmware = "${base_libdir}/firmware/*"
145INSANE_SKIP:${PN}-firmware += "arch"
146
147# common libraries
148FILES:${PN} = "${libdir}"
149
150RRECOMMENDS:${PN} += " \
151 ${PN}-tools \
152"
153
154INSANE_SKIP:${PN} += "already-stripped dev-so ldflags"
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb
index d2565318..84a9afcf 100644
--- a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-sgx-ddk-um_1.17.4948957.bb
@@ -1,4 +1,4 @@
1DESCRIPTION = "Userspace libraries for PowerVR SGX chipset on TI SoCs" 1SUMMARY = "Userspace libraries for PowerVR SGX chipset on TI SoCs"
2HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux" 2HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux"
3LICENSE = "TI-TSPA" 3LICENSE = "TI-TSPA"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
@@ -13,18 +13,27 @@ BRANCH = "${PV}/mesa/glibc-2.35"
13SRC_URI = " \ 13SRC_URI = " \
14 git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ 14 git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \
15" 15"
16SRCREV = "70364424dd496833fad5b243c9e6cc8b077f04ac" 16SRCREV = "84a396a4fb379f10931421e489ac8a199d6a9f2c"
17 17
18INITSCRIPT_NAME = "rc.pvr" 18INITSCRIPT_NAME = "rc.pvr"
19INITSCRIPT_PARAMS = "defaults 8" 19INITSCRIPT_PARAMS = "defaults 8"
20SYSTEMD_SERVICE:${PN} = "pvrsrvctl.service"
20 21
22# Prefer udev rules over everything, but we do have init services if necessary
21PACKAGECONFIG ??= "udev" 23PACKAGECONFIG ??= "udev"
22PACKAGECONFIG[udev] = "UDEV=true,,,udev" 24PACKAGECONFIG[udev] = "UDEV=true,UDEV=false,,udev,,sysvinit systemd"
25PACKAGECONFIG[systemd] = "SYSTEMD=true,SYSTEMD=false,,,,udev sysvinit"
26PACKAGECONFIG[sysvinit] = ",,,,,udev systemd"
23 27
24def use_sysvinit(d): 28def pick_init(d):
25 return d.getVar('VIRTUAL-RUNTIME_init_manager') == 'sysvinit' 29 packageconfig = d.getVar('PACKAGECONFIG').split()
30 if 'udev' not in packageconfig:
31 if d.getVar('VIRTUAL-RUNTIME_init_manager') == 'sysvinit':
32 return "update-rc.d"
33 return "systemd"
34 return ""
26 35
27inherit ${@oe.utils.ifelse(use_sysvinit(d), 'update-rc.d', '')} 36inherit ${@pick_init(d)}
28 37
29TARGET_PRODUCT:ti33x = "ti335x_linux" 38TARGET_PRODUCT:ti33x = "ti335x_linux"
30TARGET_PRODUCT:ti43x = "ti437x_linux" 39TARGET_PRODUCT:ti43x = "ti437x_linux"
@@ -35,10 +44,10 @@ RDEPENDS:${PN} += "libdrm"
35 44
36RRECOMMENDS:${PN} += "ti-sgx-ddk-km" 45RRECOMMENDS:${PN} += "ti-sgx-ddk-km"
37 46
38S = "${WORKDIR}/git"
39
40EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} ${PACKAGECONFIG_CONFARGS}" 47EXTRA_OEMAKE += "DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} ${PACKAGECONFIG_CONFARGS}"
41 48
49do_configure[noexec] = "1"
50do_compile[noexec] = "1"
42do_install() { 51do_install() {
43 oe_runmake install 52 oe_runmake install
44} 53}