[OE-core] [PATCH] mesa: upgrade 23.2.1 -> 23.3.1

2023-12-15 Thread Lucas Stach
- build amd vulkan driver for x86 platforms
- drop included patch
[https://gitlab.freedesktop.org/mesa/mesa/-/blob/1fbdd37d4c1133ced5eb9812daa1fff04cbf5daa/meson.build#L1711]

Signed-off-by: Lucas Stach 
---
Based on the 23.3.0 update patch [1] from Markus Volk, but bumped to 23.3.1
and fixed sstate mismatches between 32bit and 64bit.

[1] https://lore.kernel.org/openembedded-core/poqf5s.m9f40qh9iv...@t-online.de/
---
 ...e-cmake-dependency-detector-for-llvm.patch | 42 ---
 .../{mesa-gl_23.2.1.bb => mesa-gl_23.3.1.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc   |  9 ++--
 .../mesa/{mesa_23.2.1.bb => mesa_23.3.1.bb}   |  0
 4 files changed, 4 insertions(+), 47 deletions(-)
 delete mode 100644 
meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
 rename meta/recipes-graphics/mesa/{mesa-gl_23.2.1.bb => mesa-gl_23.3.1.bb} 
(100%)
 rename meta/recipes-graphics/mesa/{mesa_23.2.1.bb => mesa_23.3.1.bb} (100%)

diff --git 
a/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
 
b/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
deleted file mode 100644
index 4cded0546dc4..
--- 
a/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Thu, 28 Sep 2023 15:34:22 -0700
-Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors 
with meson 1.2.1
-
-meson dependency auto dependency detection uses cmake and then
-config-tool to process dependencies, in mesa the logic to detect llvm is
-using auto detection which means if it finds cmake then it will try to
-use cmake method. Cmake method works ok except a case when llvm-dev
-package is installed on the build host then it generates its own
-native.meson file and ignores OE supplied meson.native file which has
-correct llvm-config tool specified which is pointing to llvm-config from
-native sysroot. The generated meson.native file points to one found in
-/usr/bin and there onwards detector finds native install of llvm and
-configures that into building native mesa package.
-
-Since cmake detector does not always work, disable it by default and use
-config-tool which works in all cases. This is suggested in below issues
-too
-
-A similar issue is open in meson upstream [1] and mesa [2]
-
-[1] https://github.com/mesonbuild/meson/issues/10483
-[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/6738
-
-Upstream-Status: Submitted 
[https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438]
-
-Signed-off-by: Khem Raj 

- meson.build | 1 +
- 1 file changed, 1 insertion(+)
-
 a/meson.build
-+++ b/meson.build
-@@ -1659,6 +1659,7 @@ with_llvm = false
- if _llvm.allowed()
-   dep_llvm = dependency(
- 'llvm',
-+method : host_machine.system() == 'windows' ? 'auto' : 'config-tool',
- version : _llvm_version,
- modules : llvm_modules,
- optional_modules : llvm_optional_modules,
diff --git a/meta/recipes-graphics/mesa/mesa-gl_23.2.1.bb 
b/meta/recipes-graphics/mesa/mesa-gl_23.3.1.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_23.2.1.bb
rename to meta/recipes-graphics/mesa/mesa-gl_23.3.1.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc 
b/meta/recipes-graphics/mesa/mesa.inc
index e5c405a9728c..5f5c8ceb4c84 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,10 +18,9 @@ SRC_URI = 
"https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \

file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-gallium-Fix-build-with-llvm-17.patch \
-   file://0001-meson-Disable-cmake-dependency-detector-for-llvm.patch \
 "
 
-SRC_URI[sha256sum] = 
"64de0616fc2d801f929ab1ac2a4f16b3e2783c4309a724c8a259b20df8bbc1cc"
+SRC_URI[sha256sum] = 
"6e48126d70fdb3f20ffeb246ca0c2e41ffdc835f0663a03d4526b8bf5db41de6"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P\d+(\.\d+)+)"
 
@@ -105,10 +104,10 @@ PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, 
xorgproto libxshmfence"
 # Vulkan drivers need dri3 enabled
 # amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
 VULKAN_DRIVERS = ""
-VULKAN_DRIVERS:append:x86 = ",intel"
-VULKAN_DRIVERS:append:x86-64 = ",intel"
+VULKAN_DRIVERS:append:x86 = ",intel,amd"
+VULKAN_DRIVERS:append:x86-64 = ",intel,amd"
 # i686 is a 32 bit override for mesa-native
-VULKAN_DRIVERS:append:i686 = ",intel"
+VULKAN_DRIVERS:append:i686 = ",intel,amd"
 VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', 
',freedreno', '', d)}"

Re: [OE-core] [PATCH] perf: sort-pmuevents: really keep array terminators

2022-08-11 Thread Lucas Stach
Hi all,

gentle ping with some people CC'ed.

Regards,
Lucas

Am Dienstag, dem 21.06.2022 um 19:02 +0200 schrieb Lucas Stach:
> Commit e1382583cd50 ("perf: sort-pmuevents: don't drop elements") tried
> to fix a case where the array terminator elements were dropped from the
> sorted list breaking the build, but it only worked for the case where
> the terminator is the only element of the array. When the array has other
> elements the terminator will still be silently dropped, causing invalid
> memory accesses at runtime when the perf utility iterates over the array.
> 
> Fix this by treating any unmatched entry as an array terminator and also
> add a comment to make it a little more clear how things are ending up at
> the right position in the sorted list.
> 
> Signed-off-by: Lucas Stach 
> ---
>  meta/recipes-kernel/perf/perf/sort-pmuevents.py | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py 
> b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
> index 09ba3328a7ab..0362f2d8fabc 100755
> --- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
> +++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
> @@ -62,7 +62,10 @@ for struct in re.findall( struct_block_regex, data ):
>  #print( "name found: %s" % name.group(1) )
>  entry_dict[struct[2]]['fields'][name.group(1)] = entry
>  
> -if not entry_dict[struct[2]]['fields']:
> +# unmatched entries are most likely array terminators and
> +# should end up as the last element in the sorted list, which
> +# is achieved by using '0' as the key
> +if not cpuid and not name:
>  entry_dict[struct[2]]['fields']['0'] = entry
>  
>  # created ordered dictionaries from the captured values. These are ordered by
> 



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169238): 
https://lists.openembedded.org/g/openembedded-core/message/169238
Mute This Topic: https://lists.openembedded.org/mt/92954692/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] perf: sort-pmuevents: really keep array terminators

2022-06-21 Thread Lucas Stach
Commit e1382583cd50 ("perf: sort-pmuevents: don't drop elements") tried
to fix a case where the array terminator elements were dropped from the
sorted list breaking the build, but it only worked for the case where
the terminator is the only element of the array. When the array has other
elements the terminator will still be silently dropped, causing invalid
memory accesses at runtime when the perf utility iterates over the array.

Fix this by treating any unmatched entry as an array terminator and also
add a comment to make it a little more clear how things are ending up at
the right position in the sorted list.

Signed-off-by: Lucas Stach 
---
 meta/recipes-kernel/perf/perf/sort-pmuevents.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py 
b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
index 09ba3328a7ab..0362f2d8fabc 100755
--- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py
+++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -62,7 +62,10 @@ for struct in re.findall( struct_block_regex, data ):
 #print( "name found: %s" % name.group(1) )
 entry_dict[struct[2]]['fields'][name.group(1)] = entry
 
-if not entry_dict[struct[2]]['fields']:
+# unmatched entries are most likely array terminators and
+# should end up as the last element in the sorted list, which
+# is achieved by using '0' as the key
+if not cpuid and not name:
 entry_dict[struct[2]]['fields']['0'] = entry
 
 # created ordered dictionaries from the captured values. These are ordered by
-- 
2.30.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167167): 
https://lists.openembedded.org/g/openembedded-core/message/167167
Mute This Topic: https://lists.openembedded.org/mt/91904447/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-