File 0003-Fix-the-error-reporting-in-WaitTimelinePoint.patch of Package libnvidia-egl-x11
From f4263093fa941ecbecfcbe2035a2db2499ec7a5b Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Thu, 1 May 2025 12:34:30 -0600
Subject: [PATCH 3/3] Fix the error reporting in WaitTimelinePoint.
In WaitTimelinePoint, return success if drmSyncobjTimelineWait succeeds,
and report an error only if it fails.
---
src/x11/x11-window.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/x11/x11-window.c b/src/x11/x11-window.c
index ae7bc17..02167a9 100644
--- a/src/x11/x11-window.c
+++ b/src/x11/x11-window.c
@@ -1886,11 +1886,14 @@ static EGLBoolean WaitTimelinePoint(X11DisplayInstance *inst, X11Timeline *timel
&timeline->handle, &timeline->point, 1, INT64_MAX,
DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT,
&first) == 0)
+ {
+ success = EGL_TRUE;
+ }
+ else
{
eplSetError(inst->platform, EGL_BAD_ALLOC,
"Internal error: drmSyncobjTimelineWait(WAIT_FOR_SUBMIT) failed: %s\n",
strerror(errno));
- success = EGL_TRUE;
}
}
--
2.43.0