From 4e1e1c2580e55425ccfecd90271cef5cee5f50f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 6 Feb 2024 08:50:58 -0800 Subject: [PATCH] iris: Fix return of iris_wait_syncobj() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iris_wait_syncobj() succeed if IOCTL return is 0 otherwise it failled. Cc: mesa-stable Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: (cherry picked from commit 138303fb9dbad7754b109ca846a17799cc0dc1d5) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_fence.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1e95aa0fb03..67f0bb164cc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2874,7 +2874,7 @@ "description": "iris: Fix return of iris_wait_syncobj()", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/iris/iris_fence.c b/src/gallium/drivers/iris/iris_fence.c index da4cfd09fa4..12d1e2fcd62 100644 --- a/src/gallium/drivers/iris/iris_fence.c +++ b/src/gallium/drivers/iris/iris_fence.c @@ -155,7 +155,7 @@ clear_stale_syncobjs(struct iris_batch *batch) struct iris_batch_fence, i); assert(fence->flags & IRIS_BATCH_FENCE_WAIT); - if (iris_wait_syncobj(bufmgr, *syncobj, 0)) + if (iris_wait_syncobj(bufmgr, *syncobj, 0) == false) continue; /* This sync object has already passed, there's no need to continue @@ -225,7 +225,7 @@ iris_wait_syncobj(struct iris_bufmgr *bufmgr, .count_handles = 1, .timeout_nsec = timeout_nsec, }; - return intel_ioctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &args); + return intel_ioctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &args) == 0; } #define CSI "\e["