1
1
mirror of https://github.com/OpenVoiceOS/OpenVoiceOS synced 2024-12-12 08:56:25 +01:00
OpenVoiceOS/buildroot-patches/0112-Bump-mesa3d-to-latest-version-from-buildroot-master.patch

393 lines
14 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From a14fa4637769f1c77812ccf3b9f2d035c6b7bfd0 Mon Sep 17 00:00:00 2001
From: j1nx <p.steenbergen@j1nx.nl>
Date: Mon, 18 May 2020 10:20:52 +0200
Subject: [PATCH 1/1] Bump mesa3d to latest version from buildroot master
---
package/mesa3d-headers/mesa3d-headers.mk | 2 +-
...d-scanner-provided-by-wayland-scanne.patch | 52 ------------------
.../0005-vc4_bufmgr-fix-time_t-printf.patch | 33 ++++++++++++
...n_bo.h-add-time.h-include-for-time_t.patch | 32 +++++++++++
...util-remove-the-dependency-on-kcmp.h.patch | 42 ---------------
.../0007-v3d_bufmgr-fix-time_t-printf.patch | 33 ++++++++++++
package/mesa3d/Config.in | 2 +-
package/mesa3d/mesa3d.hash | 8 +--
package/mesa3d/mesa3d.mk | 54 +++++++++++--------
9 files changed, 137 insertions(+), 121 deletions(-)
delete mode 100644 package/mesa3d/0002-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
create mode 100644 package/mesa3d/0005-vc4_bufmgr-fix-time_t-printf.patch
create mode 100644 package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
delete mode 100644 package/mesa3d/0006-util-remove-the-dependency-on-kcmp.h.patch
create mode 100644 package/mesa3d/0007-v3d_bufmgr-fix-time_t-printf.patch
diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk
index 6af6e8843f..51b10acdb5 100644
--- a/package/mesa3d-headers/mesa3d-headers.mk
+++ b/package/mesa3d-headers/mesa3d-headers.mk
@@ -12,7 +12,7 @@ endif
# Not possible to directly refer to mesa3d variables, because of
# first/second expansion trickery...
-MESA3D_HEADERS_VERSION = 19.3.4
+MESA3D_HEADERS_VERSION = 20.0.7
MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz
MESA3D_HEADERS_SITE = https://mesa.freedesktop.org/archive
MESA3D_HEADERS_DL_SUBDIR = mesa3d
diff --git a/package/mesa3d/0002-meson-use-wayland-scanner-provided-by-wayland-scanne.patch b/package/mesa3d/0002-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
deleted file mode 100644
index 784b27c4a2..0000000000
--- a/package/mesa3d/0002-meson-use-wayland-scanner-provided-by-wayland-scanne.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0e107f7bac8d84d8fb2bb5b83bfb4474348a82c1 Mon Sep 17 00:00:00 2001
-From: Romain Naour <romain.naour@smile.fr>
-Date: Wed, 17 Apr 2019 22:47:05 +0200
-Subject: [PATCH] meson: use wayland-scanner provided by wayland-scanner-path
-
-When cross-compiling the .pc file might point to the wrong
-wayland-scanner binary (target rather than host) resulting in a
-non-executable and wrong scanner.
-First try by using the path provided by wayland-scanner-path,
-and if that fails fall back into pkg-config.
-
-Based on the patch for autotools provided by Gustavo Zacarias.
-
-Signed-off-by: Romain Naour <romain.naour@smile.fr>
----
- meson.build | 5 ++++-
- meson_options.txt | 6 ++++++
- 2 files changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 6c4f1508855..ef0532b2cfb 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1319,7 +1319,10 @@ endif
-
- if with_platform_wayland
- dep_wl_scanner = dependency('wayland-scanner', native: true)
-- prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
-+ prog_wl_scanner = get_option('wayland-scanner-path')
-+ if prog_wl_scanner == ''
-+ prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
-+ endif
- if dep_wl_scanner.version().version_compare('>= 1.15')
- wl_scanner_arg = 'private-code'
- else
-diff --git a/meson_options.txt b/meson_options.txt
-index ccf70659ff7..59ff8df8337 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -324,3 +324,9 @@ option(
- value : true,
- description : 'Enable direct rendering in GLX and EGL for DRI',
- )
-+option(
-+ 'wayland-scanner-path',
-+ type : 'string',
-+ value : '',
-+ description : 'Locations to wayland-scanner binary. Default: use path from pkg-config'
-+)
---
-2.20.1
-
diff --git a/package/mesa3d/0005-vc4_bufmgr-fix-time_t-printf.patch b/package/mesa3d/0005-vc4_bufmgr-fix-time_t-printf.patch
new file mode 100644
index 0000000000..56357e1f3a
--- /dev/null
+++ b/package/mesa3d/0005-vc4_bufmgr-fix-time_t-printf.patch
@@ -0,0 +1,33 @@
+From 4ed48324b032857c95e6803409d5def9660d5b46 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 22 Mar 2020 11:42:35 +0100
+Subject: [PATCH] vc4_bufmgr: fix time_t printf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+ error: format %ld expects argument of type long int, but argument 3 has type time_t {aka long long int}
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/gallium/drivers/vc4/vc4_bufmgr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/drivers/vc4/vc4_bufmgr.c b/src/gallium/drivers/vc4/vc4_bufmgr.c
+index f7ac1698ee3..a786e8ee939 100644
+--- a/src/gallium/drivers/vc4/vc4_bufmgr.c
++++ b/src/gallium/drivers/vc4/vc4_bufmgr.c
+@@ -100,7 +100,7 @@ vc4_bo_dump_stats(struct vc4_screen *screen)
+ struct timespec time;
+ clock_gettime(CLOCK_MONOTONIC, &time);
+ fprintf(stderr, " now: %ld\n",
+- time.tv_sec);
++ (long)time.tv_sec);
+ }
+ }
+
+--
+2.25.1
+
diff --git a/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
new file mode 100644
index 0000000000..1586b26bba
--- /dev/null
+++ b/package/mesa3d/0006-pan_bo.h-add-time.h-include-for-time_t.patch
@@ -0,0 +1,32 @@
+From fc93d357efd207525a4ddaac609ab5a6bf469bcd Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 22 Mar 2020 11:48:31 +0100
+Subject: [PATCH] pan_bo.h: add time.h include for time_t
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+ ../src/gallium/drivers/panfrost/pan_bo.h:93:9: error: unknown type name time_t
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/gallium/drivers/panfrost/pan_bo.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gallium/drivers/panfrost/pan_bo.h b/src/gallium/drivers/panfrost/pan_bo.h
+index 414c356b95c..6dda393095d 100644
+--- a/src/gallium/drivers/panfrost/pan_bo.h
++++ b/src/gallium/drivers/panfrost/pan_bo.h
+@@ -29,6 +29,7 @@
+ #include <panfrost-misc.h>
+ #include "pipe/p_state.h"
+ #include "util/list.h"
++#include <time.h>
+
+ struct panfrost_screen;
+
+--
+2.25.1
+
diff --git a/package/mesa3d/0006-util-remove-the-dependency-on-kcmp.h.patch b/package/mesa3d/0006-util-remove-the-dependency-on-kcmp.h.patch
deleted file mode 100644
index 27ae021e08..0000000000
--- a/package/mesa3d/0006-util-remove-the-dependency-on-kcmp.h.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 63ad4535df6a0a938e7391d73adcada05e730c89 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <marek.olsak@amd.com>
-Date: Tue, 18 Feb 2020 16:12:23 -0500
-Subject: [PATCH] util: remove the dependency on kcmp.h
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes: f76cbc7901f7 "util: Add os_same_file_description helper"
-
-Acked-by: Eric Engestrom <eric@engestrom.ch>
-Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3860>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3860>
-
-[ Upstream: https://cgit.freedesktop.org/mesa/mesa/commit/?id=f7bfb10c69dfe48a91e35523cb5ee641bdbf6988 ]
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
----
- src/util/os_file.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/util/os_file.c b/src/util/os_file.c
-index b502ff4..128fe87 100644
---- a/src/util/os_file.c
-+++ b/src/util/os_file.c
-@@ -34,11 +34,12 @@ os_file_create_unique(const char *filename, int filemode)
- #if defined(__linux__)
-
- #include <fcntl.h>
--#include <linux/kcmp.h>
- #include <sys/stat.h>
- #include <sys/syscall.h>
- #include <unistd.h>
-
-+/* copied from <linux/kcmp.h> */
-+#define KCMP_FILE 0
-
- static ssize_t
- readN(int fd, char *buf, size_t len)
---
-2.25.1
-
diff --git a/package/mesa3d/0007-v3d_bufmgr-fix-time_t-printf.patch b/package/mesa3d/0007-v3d_bufmgr-fix-time_t-printf.patch
new file mode 100644
index 0000000000..f8031c2847
--- /dev/null
+++ b/package/mesa3d/0007-v3d_bufmgr-fix-time_t-printf.patch
@@ -0,0 +1,33 @@
+From c4984ce2b7d3bd7129ddb02e4e423bf00498607a Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Sun, 22 Mar 2020 13:03:00 +0100
+Subject: [PATCH] v3d_bufmgr: fix time_t printf
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes:
+
+ error: format %ld expects argument of type long int, but argument 3 has type time_t {aka long long int}
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/gallium/drivers/v3d/v3d_bufmgr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gallium/drivers/v3d/v3d_bufmgr.c b/src/gallium/drivers/v3d/v3d_bufmgr.c
+index 50e4081dafd..31a08036b38 100644
+--- a/src/gallium/drivers/v3d/v3d_bufmgr.c
++++ b/src/gallium/drivers/v3d/v3d_bufmgr.c
+@@ -81,7 +81,7 @@ v3d_bo_dump_stats(struct v3d_screen *screen)
+ struct timespec time;
+ clock_gettime(CLOCK_MONOTONIC, &time);
+ fprintf(stderr, " now: %ld\n",
+- time.tv_sec);
++ (long)time.tv_sec);
+ }
+ }
+
+--
+2.25.1
+
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 16d77f42c2..dd512d9b76 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -106,13 +106,13 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
select BR2_PACKAGE_LIBDRM_ETNAVIV
select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
- select BR2_PACKAGE_MESA3D_OPENGL_EGL
help
Mesa driver for Vivante GPUs.
config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO
bool "Gallium freedreno driver"
select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+ select BR2_PACKAGE_LIBDRM_FREEDRENO
select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
help
Mesa driver for Freedreno GPUs.
diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash
index 3237135b1c..0a6d0c5a82 100644
--- a/package/mesa3d/mesa3d.hash
+++ b/package/mesa3d/mesa3d.hash
@@ -1,6 +1,6 @@
-# From https://lists.freedesktop.org/archives/mesa-announce/2020-February/000570.html
-sha256 1da467e6ae2799a517e242462331eafd29ae77d9872f3a845df81f7c308e8fe4 mesa-19.3.4.tar.xz
-sha512 2bbb3dc8f1d839f11fe12cc959393cd69607fa6714b2166b80299e0559d2d3b0ac38ed4e15ac3e5f472264eb24536d1901d350f7409f3a7e00d6f4ccbb2312fb mesa-19.3.4.tar.xz
+# From https://lists.freedesktop.org/archives/mesa-announce/2020-May/000583.html
+sha256 fe6e258fe772c3cd2ac01741bf7408058c3ac02d66acff9a6e669bd72e3ea178 mesa-20.0.7.tar.xz
+sha512 00baae50f14bf2b08b5654dffb11cf67499dc1825e1700b137fb5719e767e0e78e789979df2c194f677ea9c5e531f34965d47b9e37c239944c38d0570c7a9685 mesa-20.0.7.tar.xz
# License
-sha256 d8d662974fc86e2e640362015e42de3fcc161d435a9f2111ecd8561412feca73 docs/license.html
+sha256 1ddae7da415352a5b5360ff3a9d7ecf23ba81408f62eeecce0011f32e3ef9da6 docs/license.html
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index e742c4982b..d1933dabfd 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -5,7 +5,7 @@
################################################################################
# When updating the version, please also update mesa3d-headers
-MESA3D_VERSION = 19.3.4
+MESA3D_VERSION = 20.0.7
MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz
MESA3D_SITE = https://mesa.freedesktop.org/archive
MESA3D_LICENSE = MIT, SGI, Khronos
@@ -25,8 +25,7 @@ MESA3D_DEPENDENCIES = \
MESA3D_CONF_OPTS = \
-Dgallium-omx=disabled \
- -Dpower8=false \
- -Dvalgrind=false
+ -Dpower8=false
ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES += host-llvm llvm
@@ -168,7 +167,22 @@ endef
MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_HEADERS
endif
-MESA3D_PLATFORMS = surfaceless
+ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_X11),y)
+MESA3D_DEPENDENCIES += \
+ xlib_libX11 \
+ xlib_libXext \
+ xlib_libXdamage \
+ xlib_libXfixes \
+ xlib_libXrandr \
+ xlib_libXxf86vm \
+ xorgproto \
+ libxcb
+MESA3D_PLATFORMS += x11
+endif
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+MESA3D_DEPENDENCIES += wayland wayland-protocols
+MESA3D_PLATFORMS += wayland
+endif
ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y)
MESA3D_PLATFORMS += drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D),y)
@@ -190,23 +204,7 @@ MESA3D_PLATFORMS += drm
else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI),y)
MESA3D_PLATFORMS += drm
endif
-ifeq ($(BR2_PACKAGE_WAYLAND),y)
-MESA3D_DEPENDENCIES += wayland wayland-protocols
-MESA3D_PLATFORMS += wayland
-MESA3D_CONF_OPTS += -Dwayland-scanner-path=$(HOST_DIR)/bin/wayland-scanner
-endif
-ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_X11),y)
-MESA3D_DEPENDENCIES += \
- xlib_libX11 \
- xlib_libXext \
- xlib_libXdamage \
- xlib_libXfixes \
- xlib_libXrandr \
- xlib_libXxf86vm \
- xorgproto \
- libxcb
-MESA3D_PLATFORMS += x11
-endif
+MESA3D_PLATFORMS += surfaceless
MESA3D_CONF_OPTS += \
-Dplatforms=$(subst $(space),$(comma),$(MESA3D_PLATFORMS))
@@ -242,6 +240,13 @@ else
MESA3D_CONF_OPTS += -Dgallium-xvmc=false
endif
+ifeq ($(BR2_PACKAGE_VALGRIND),y)
+MESA3D_CONF_OPTS += -Dvalgrind=true
+MESA3D_DEPENDENCIES += valgrind
+else
+MESA3D_CONF_OPTS += -Dvalgrind=false
+endif
+
ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
MESA3D_CONF_OPTS += -Dlibunwind=true
MESA3D_DEPENDENCIES += libunwind
@@ -263,4 +268,11 @@ else
MESA3D_CONF_OPTS += -Dlmsensors=false
endif
+ifeq ($(BR2_PACKAGE_ZSTD),y)
+MESA3D_CONF_OPTS += -Dzstd=true
+MESA3D_DEPENDENCIES += zstd
+else
+MESA3D_CONF_OPTS += -Dzstd=false
+endif
+
$(eval $(meson-package))
--
2.20.1