summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2023-03-09 13:37:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-11 00:08:40 +0000
commitdc2a0be70e869f61d4a324c843bd22855ed9c0a9 (patch)
tree8dab2a74b113404b225f32317aac422f44bb76aa /meta/recipes-graphics/mesa
parent3c7463a8484b2f2d1034e90e7b5557b4cbfa6fe8 (diff)
downloadpoky-dc2a0be70e869f61d4a324c843bd22855ed9c0a9.tar.gz
mesa: import patch from upstream to fix tools build on musl
Fix building the crashdec on the musl systems. (From OE-Core rev: 8bb91d97757f7a84e8ecdbb18457a9d3dcce6417) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch44
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
new file mode 100644
index 0000000000..3ab22889bf
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
@@ -0,0 +1,44 @@
1From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
2From: Jami Kettunen <jami.kettunen@protonmail.com>
3Date: Tue, 31 Aug 2021 00:15:58 +0300
4Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
5
6Upstream-Status: Backport
7
8Fixes the following error I noticed when building against aarch64 with
9musl libc:
10
11 In file included from ../src/freedreno/decode/crashdec.h:38,
12 from ../src/freedreno/decode/crashdec.c:40:
13 ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
14 104 | static inline uint
15 | ^~~~
16 ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
17 105 | pm4_calc_odd_parity_bit(uint val)
18 | ^~~~
19 | int
20
21Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
22Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
23---
24 src/freedreno/common/freedreno_pm4.h | 4 ++--
25 1 file changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
28index 8f958953d693..091247e709a0 100644
29--- a/src/freedreno/common/freedreno_pm4.h
30+++ b/src/freedreno/common/freedreno_pm4.h
31@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
32 #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
33 #define type3_pkt_size(pkt) ((((pkt) >> 16) & 0x3FFF) + 1)
34
35-static inline uint
36-pm4_calc_odd_parity_bit(uint val)
37+static inline unsigned
38+pm4_calc_odd_parity_bit(unsigned val)
39 {
40 return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
41 ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
42--
432.39.2
44
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 8a8a057c6b..c0b8f65625 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
19 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 19 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
20 file://0001-util-format-Check-for-NEON-before-using-it.patch \ 20 file://0001-util-format-Check-for-NEON-before-using-it.patch \
21 file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \ 21 file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
22 file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
22 " 23 "
23 24
24SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9" 25SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"