iris: Fix return of iris_wait_syncobj()

iris_wait_syncobj() succeed if IOCTL return is 0 otherwise it failled.

Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27500>
(cherry picked from commit 138303fb9d)
This commit is contained in:
José Roberto de Souza
2024-02-06 08:50:58 -08:00
committed by Eric Engestrom
parent 9110f641df
commit 4e1e1c2580
2 changed files with 3 additions and 3 deletions

View File

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

View File

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