From afb34f49b7cb6aae2ee0402a60dfa4e2714eb473 Mon Sep 17 00:00:00 2001 From: Luis Date: Fri, 7 Apr 2023 19:56:22 +0000 Subject: [PATCH] mesa: update to 23.0.2 --- main/mesa/.checksums | 6 +-- main/mesa/.pkgfiles | 2 +- ...IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch | 51 ------------------- ...d-abort-if-kernel-can-t-allocate-mem.patch | 34 ------------- ...fix-scheduling-of-HALT-instructions.patch} | 0 main/mesa/spkgbuild | 12 ++--- 6 files changed, 7 insertions(+), 98 deletions(-) delete mode 100644 main/mesa/0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch delete mode 100644 main/mesa/0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch rename main/mesa/{0003-intel-fs-fix-scheduling-of-HALT-instructions.patch => intel-fs-fix-scheduling-of-HALT-instructions.patch} (100%) diff --git a/main/mesa/.checksums b/main/mesa/.checksums index 9006cf899..99bbbac1a 100644 --- a/main/mesa/.checksums +++ b/main/mesa/.checksums @@ -1,4 +1,2 @@ -35a8ce6f6d63622e83b912dd27faeafe 0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch -f80b787e25ed4a3b99060441930c67fd 0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch -09c7b6a300022cb2fc84fd630135cfeb 0003-intel-fs-fix-scheduling-of-HALT-instructions.patch -a95c1528b2a5cb4d6a1a0b77554de1a6 mesa-23.0.1.tar.xz +09c7b6a300022cb2fc84fd630135cfeb intel-fs-fix-scheduling-of-HALT-instructions.patch +ffea65f5dd7f1be1e4f941ad990a3ae7 mesa-23.0.2.tar.xz diff --git a/main/mesa/.pkgfiles b/main/mesa/.pkgfiles index f9f70e39b..fb223bb8b 100644 --- a/main/mesa/.pkgfiles +++ b/main/mesa/.pkgfiles @@ -1,4 +1,4 @@ -mesa-23.0.1-2 +mesa-23.0.2-1 drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -r-xr-xr-x root/root usr/bin/mesa-overlay-control.py diff --git a/main/mesa/0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch b/main/mesa/0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch deleted file mode 100644 index 425857a13..000000000 --- a/main/mesa/0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kai-Heng Feng -Date: Thu, 29 Dec 2022 13:43:27 +0800 -Subject: [PATCH] iris: Retry DRM_IOCTL_I915_GEM_EXECBUFFER2 on ENOMEM -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We are seeing endless DRM_IOCTL_SYNCOBJ_WAIT ioctl when system memory is -under pressured. - -Commit f9d8d9acbb6a ("iris: Avoid abort() if kernel can't allocate -memory") avoids the abort() on ENOMEM by resetting the batch. However, -when there's an ongoing OpenGL query, resetting the batch will make the -snapshots_landed never be flipped, so iris_get_query_result() gets stuck -in the while loop forever. - -Since there's no guarantee that the next batch after resetting won't hit -ENOMEM, so instead of resetting the batch, be patient and wait until kernel has -enough memory. Once the batch is submiited and snapshots_landed gets -flipped, iris_get_query_result() can proceed normally. - -Reviewed-by: José Roberto de Souza -Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6851 -Part-of: ---- - src/gallium/drivers/iris/iris_batch.c | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c -index c7a08a0e1f5f..deab85ce4aaf 100644 ---- a/src/gallium/drivers/iris/iris_batch.c -+++ b/src/gallium/drivers/iris/iris_batch.c -@@ -981,9 +981,14 @@ submit_batch(struct iris_batch *batch) - } - - int ret = 0; -- if (!batch->screen->devinfo->no_hw && -- intel_ioctl(batch->screen->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf)) -- ret = -errno; -+ if (!batch->screen->devinfo->no_hw) { -+ do { -+ ret = intel_ioctl(batch->screen->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); -+ } while (ret && errno == ENOMEM); -+ -+ if (ret) -+ ret = -errno; -+ } - - simple_mtx_unlock(bo_deps_lock); - diff --git a/main/mesa/0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch b/main/mesa/0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch deleted file mode 100644 index a66637c8d..000000000 --- a/main/mesa/0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kai-Heng Feng -Date: Thu, 29 Dec 2022 14:01:31 +0800 -Subject: [PATCH] Revert "iris: Avoid abort() if kernel can't allocate memory" -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This reverts commit f9d8d9acbb6a620684fb4dac4affe25816587d92. - -Now ENOMEM is handled in submit_batch(), we don't need to check it for -resetting anymore. - -Reviewed-by: José Roberto de Souza -Part-of: ---- - src/gallium/drivers/iris/iris_batch.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c -index deab85ce4aaf..2993f0ab7ee8 100644 ---- a/src/gallium/drivers/iris/iris_batch.c -+++ b/src/gallium/drivers/iris/iris_batch.c -@@ -1097,9 +1097,8 @@ _iris_batch_flush(struct iris_batch *batch, const char *file, int line) - * with a new logical context, and inform iris_context that all state - * has been lost and needs to be re-initialized. If this succeeds, - * dubiously claim success... -- * Also handle ENOMEM here. - */ -- if ((ret == -EIO || ret == -ENOMEM) && replace_kernel_ctx(batch)) { -+ if (ret == -EIO && replace_kernel_ctx(batch)) { - if (batch->reset->reset) { - /* Tell gallium frontends the device is lost and it was our fault. */ - batch->reset->reset(batch->reset->data, PIPE_GUILTY_CONTEXT_RESET); diff --git a/main/mesa/0003-intel-fs-fix-scheduling-of-HALT-instructions.patch b/main/mesa/intel-fs-fix-scheduling-of-HALT-instructions.patch similarity index 100% rename from main/mesa/0003-intel-fs-fix-scheduling-of-HALT-instructions.patch rename to main/mesa/intel-fs-fix-scheduling-of-HALT-instructions.patch diff --git a/main/mesa/spkgbuild b/main/mesa/spkgbuild index 8ae4911cf..f0e682369 100755 --- a/main/mesa/spkgbuild +++ b/main/mesa/spkgbuild @@ -3,12 +3,10 @@ # optional : libva libvdpau wayland-protocols name=mesa -version=23.0.1 -release=2 +version=23.0.2 +release=1 source="https://mesa.freedesktop.org/archive/$name-$version.tar.xz - 0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch - 0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch - 0003-intel-fs-fix-scheduling-of-HALT-instructions.patch" + intel-fs-fix-scheduling-of-HALT-instructions.patch" build() { @@ -17,9 +15,7 @@ build() { scratch isinstalled libva && OPT_MESA_VAAPI='-D gallium-va=enabled' || OPT_MESA_VAAPI='-D gallium-va=disabled' scratch isinstalled wayland-protocols && OPT_MESA_PLATFORMS='wayland,x11' || OPT_MESA_PLATFORMS='x11' - patch -d $name-$version -Np1 -i $SRC/0001-iris-Retry-DRM_IOCTL_I915_GEM_EXECBUFFER2-on-ENOMEM.patch - patch -d $name-$version -Np1 -i $SRC/0002-Revert-iris-Avoid-abort-if-kernel-can-t-allocate-mem.patch - patch -d $name-$version -Np1 -i $SRC/0003-intel-fs-fix-scheduling-of-HALT-instructions.patch + patch -d $name-$version -Np1 -i $SRC/intel-fs-fix-scheduling-of-HALT-instructions.patch venom-meson $name-$version build \ -D dri3=enabled \