From 4914849dfc5454198cad32328a0bcf83f15da5aa Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 7 Jan 2025 01:46:54 -0500 Subject: [PATCH] downgrade to 24.2.4 --- user/mesa/23630.patch | 24 ++++++++ user/mesa/29401.patch | 32 ++++++++++ user/mesa/APKBUILD | 58 +++++-------------- ...ri-Add-Rockchip-EBC-to-kmsro-drivers.patch | 21 +++++++ user/mesa/riscv64-tls.patch | 4 +- 5 files changed, 95 insertions(+), 44 deletions(-) create mode 100644 user/mesa/23630.patch create mode 100644 user/mesa/29401.patch diff --git a/user/mesa/23630.patch b/user/mesa/23630.patch new file mode 100644 index 0000000..e6a68c2 --- /dev/null +++ b/user/mesa/23630.patch @@ -0,0 +1,24 @@ +From 1b87b0675fde5fd2e11d9c6a9ddf284ac82d8661 Mon Sep 17 00:00:00 2001 +From: Denis +Date: Tue, 13 Jun 2023 21:51:04 +0500 +Subject: [PATCH] freedreno: Enable A505 + +--- + src/freedreno/common/freedreno_devices.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py +index 8b33a2ec3fb04..4e7a38f26e8a7 100644 +--- a/src/freedreno/common/freedreno_devices.py ++++ b/src/freedreno/common/freedreno_devices.py +@@ -241,6 +241,7 @@ add_gpus([ + )) + + add_gpus([ ++ GPUId(505), + GPUId(506), + GPUId(508), + GPUId(509), +-- +GitLab + diff --git a/user/mesa/29401.patch b/user/mesa/29401.patch new file mode 100644 index 0000000..b0cf9cd --- /dev/null +++ b/user/mesa/29401.patch @@ -0,0 +1,32 @@ +From dc6e6d7a2bedcc34d59e76f08ca4362369438f32 Mon Sep 17 00:00:00 2001 +From: David Heidelberg +Date: Tue, 28 May 2024 14:15:09 -0700 +Subject: [PATCH] freedreno: Enable Adreno 306A + +Enable the Adreno 306A that is found on the QM215 SoC (Qualcomm 215). + +The GPU marketing name is Adreno 308. + +Kernel patch: https://lore.kernel.org/linux-arm-msm/20240528-a306a-v1-1-03a66dacd8c7@gmail.com/ + +Signed-off-by: David Heidelberg +Part-of: +--- + src/freedreno/common/freedreno_devices.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py +index 2d38d01862b7f..b3ad9fbc4b9f0 100644 +--- a/src/freedreno/common/freedreno_devices.py ++++ b/src/freedreno/common/freedreno_devices.py +@@ -217,6 +217,7 @@ add_gpus([ + GPUId(320), + GPUId(330), + GPUId(chip_id=0x03000512, name="FD305B"), ++ GPUId(chip_id=0x03000620, name="FD306A"), + ], GPUInfo( + CHIP.A3XX, + gmem_align_w = 32, gmem_align_h = 32, +-- +GitLab + diff --git a/user/mesa/APKBUILD b/user/mesa/APKBUILD index 4d72378..2a25961 100644 --- a/user/mesa/APKBUILD +++ b/user/mesa/APKBUILD @@ -1,8 +1,7 @@ -# Contributor: David Heidelberg # Maintainer: Natanael Copa pkgname=mesa -pkgver=24.3.3 -pkgrel=1 +pkgver=24.2.4 +pkgrel=10 pkgdesc="Mesa DRI OpenGL library" url="https://www.mesa3d.org" arch="all" @@ -25,7 +24,7 @@ subpackages=" $pkgname-vulkan-layers:_vulkan_layers $pkgname-libd3dadapter9 " -_llvmver=19 +_llvmver=18 depends_dev=" libdrm-dev libxext-dev @@ -70,11 +69,14 @@ makedepends=" source=" https://mesa.freedesktop.org/archive/mesa-${pkgver/_/-}.tar.xz dri-Add-Rockchip-EBC-to-kmsro-drivers.patch + 29401.patch + 23630.patch riscv64-tls.patch " +options="!check" # we skip tests intentionally builddir="$srcdir/mesa-${pkgver/_/-}" -_dri_driverdir=/usr/lib/dri +_dri_driverdir=/usr/lib/xorg/modules/dri _gallium_drivers="r300,r600,radeonsi,nouveau,llvmpipe,virgl,zink" _vulkan_drivers="amd,swrast" _vulkan_layers="device-select,overlay" @@ -86,10 +88,7 @@ x86*) ;; armhf|armv7|aarch64) _gallium_drivers="$_gallium_drivers,vc4,v3d,freedreno,lima,panfrost,etnaviv,tegra" - _gallium_drivers="${_gallium_drivers//r300,}" ;; -riscv64|loongarch64) - _gallium_drivers="${_gallium_drivers//r300,}" esac # extra vulkan per arch @@ -113,11 +112,6 @@ aarch64) ;; esac -_intel_rt=disabled -case "$CARCH" in - x86_64) _intel_rt=enabled ;; -esac - case "$CARCH" in x86) # lto fails on x86 only @@ -166,16 +160,7 @@ build() { abuild-meson \ -Db_ndebug=true \ -Db_lto=$_lto \ - -Dallow-kcmp=enabled \ - -Dexpat=enabled \ - -Dintel-rt=$_intel_rt \ - -Dpower8=enabled \ - -Dshader-cache=enabled \ - -Dxlib-lease=enabled \ - -Dxmlconfig=enabled \ - -Dzstd=enabled \ -Dbackend_max_links=2 \ - -Dbuild-tests=true \ -Ddri-drivers-path=$_dri_driverdir \ -Dgallium-drivers=$_gallium_drivers \ -Dvulkan-drivers=$_vulkan_drivers \ @@ -207,24 +192,9 @@ build() { meson compile -C output } -# Tests workarounds -# TODO: remove --no-suite glx with 24.3 (already dropped from mesa-git) -_tests_opts="--no-suite glx" -case "$CARCH" in -armhf|armv7|riscv64|loongarch64|ppc64le) - # https://gitlab.alpinelinux.org/alpine/aports/-/issues/16525 - _tests_opts="$_tests_opts --no-suite mesa:llvmpipe" - ;; -s390x) - # https://gitlab.freedesktop.org/mesa/mesa/-/issues/9507 - # mesa:amd / ac_surface_modifier_test timeouts (CI perf issue I assume) - _tests_opts="$_tests_opts --no-suite mesa:gallium --no-suite mesa:llvmpipe --no-suite mesa:amd" - ;; -esac - -check() { - LC_ALL=C.UTF=8 meson test --no-rebuild --print-errorlogs $_tests_opts -C output -} +#check() { +# LC_ALL=C.UTF=8 meson test --no-rebuild --print-errorlogs -C output +#} package() { provider_priority=100 @@ -403,7 +373,9 @@ _vulkan_layers() { } sha512sums=" -280d7a6dd64503ec398d449430270c78b5558c03bfeed3a42346573fd2db1aa3f96f5a212e49288718a7fe27447ee40235b066517622d68b0dfdd7b251a4e85f mesa-24.3.3.tar.xz -4cfd6532a96103589efd885240ce12414b473aed05956507e0b78a46e44216974adac1a8dc22db0d185e6c8a98988ebaed79ac0e83156c75a41199591f52f944 dri-Add-Rockchip-EBC-to-kmsro-drivers.patch -ce1887fb7d425b94c375a0547bee40c308809c01f5ce1bcddabcc69a7fcb445efb9d5f5c7bac49b2778ab40687c7bce204d278b0bf028d124c75e59083107fba riscv64-tls.patch +f0f1c23591cce85966efaf3988afdb14b64ceb7216b3994e8fc50e8ddc62c35a84b2013285c84080d963aec2afb94dac345f5f00e7ccf9ae7e9ab3f5b9ba0bcb mesa-24.2.4.tar.xz +59a4fc92ab287c3bbc3930c3e8b37bd042060458db3ef3191241ca728ae3e4a3f36f008a7965eab99a7d2eb6c03e6d2b827ca4347557b5305758cad9092576d7 dri-Add-Rockchip-EBC-to-kmsro-drivers.patch +f32c2425e2c97f8c62fbd7b54723e56d75642cbfd03dc4a30be49ce27d41ddc2d1cac227186d9a2e7bbac0484ba501b538734f428d9c4e791ed201fc571c1575 29401.patch +dfb0d46f6bcb7a9eb36206a286054666867ba27b702558297a103979c585aabebb6566cd6a6c3ab4c5d3cad54eb455b29bae4d1f11b282ea1903ba8a53a24a7a 23630.patch +c151f9fb3d4d2e49fcdbbea492c7c1946148333c74a7356abce33594487b2ed512434673e8dcc279219d7ad068bd04c8cc329fa6f2e897e6311441fe65e061db riscv64-tls.patch " diff --git a/user/mesa/dri-Add-Rockchip-EBC-to-kmsro-drivers.patch b/user/mesa/dri-Add-Rockchip-EBC-to-kmsro-drivers.patch index 32557d8..d37f0fe 100644 --- a/user/mesa/dri-Add-Rockchip-EBC-to-kmsro-drivers.patch +++ b/user/mesa/dri-Add-Rockchip-EBC-to-kmsro-drivers.patch @@ -12,6 +12,27 @@ Link: https://lore.kernel.org/linux-arm-kernel/20220413221916.50995-1-samuel@sho src/gallium/targets/dril/meson.build | 1 + 3 files changed, 5 insertions(+) +diff --git a/src/gallium/targets/dri/dri_target.c b/src/gallium/targets/dri/dri_target.c +index 6604afe99f5..9bcbc378c99 100644 +--- a/src/gallium/targets/dri/dri_target.c ++++ b/src/gallium/targets/dri/dri_target.c +@@ -126,6 +126,7 @@ DEFINE_LOADER_DRM_ENTRYPOINT(pl111) + DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) + DEFINE_LOADER_DRM_ENTRYPOINT(repaper) + DEFINE_LOADER_DRM_ENTRYPOINT(rockchip) ++DEFINE_LOADER_DRM_ENTRYPOINT(rockchip_ebc) + DEFINE_LOADER_DRM_ENTRYPOINT(rzg2l_du) + DEFINE_LOADER_DRM_ENTRYPOINT(ssd130x) + DEFINE_LOADER_DRM_ENTRYPOINT(st7586) +@@ -302,6 +303,8 @@ dri_loader_get_extensions(const char *driver_name) + return __driDriverGetExtensions_repaper(); + if (!strcmp(driver_name, "rockchip")) + return __driDriverGetExtensions_rockchip(); ++ if (!strcmp(driver_name, "rockchip-ebc")) ++ return __driDriverGetExtensions_rockchip_ebc(); + if (!strcmp(driver_name, "rzg2l-du")) + return __driDriverGetExtensions_rzg2l_du(); + if (!strcmp(driver_name, "ssd130x")) diff --git a/src/gallium/targets/dril/dril_target.c b/src/gallium/targets/dril/dril_target.c index a94ab09858f..2e628ae1c02 100644 --- a/src/gallium/targets/dril/dril_target.c diff --git a/user/mesa/riscv64-tls.patch b/user/mesa/riscv64-tls.patch index 55932a3..244f436 100644 --- a/user/mesa/riscv64-tls.patch +++ b/user/mesa/riscv64-tls.patch @@ -1,5 +1,7 @@ upstream: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11729 +also loongarch64 needs to use -mtls-dialect=trad + diff --git a/meson.build b/meson.build index 3d72bb56f25..5161c97af11 100644 --- a/meson.build @@ -9,7 +11,7 @@ index 3d72bb56f25..5161c97af11 100644 endif endforeach -if not have_mtls_dialect -+if not have_mtls_dialect and host_machine.cpu_family() != 'riscv64' ++if not have_mtls_dialect and host_machine.cpu_family() != 'riscv64' and host_machine.cpu_family() != 'loongarch64' # need .run to check libc support. meson aborts when calling .run when # cross-compiling, but because this is just an optimization we can skip it if meson.is_cross_build() and not meson.can_run_host_binaries()