Merge pull request #4484 from lumarogit/mesa

mesa: update to 23.0.2
This commit is contained in:
Luis
2023-04-07 21:57:56 +02:00
committed by GitHub
6 changed files with 7 additions and 98 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,51 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
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 <jose.souza@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6851
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20449>
---
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);

View File

@@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
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 <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20449>
---
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);

View File

@@ -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 \