Instead add some additional flag to DRM_SYNCOBJ_WAIT_FLAGS_* so that the IOCTL aborts the wait and returns an error as soon as it sees any fence with an error.
Another DRM_SYNCOBJ_QUERY_FLAGS_* is potentially also useful to query the error on a number of drm_syncobjs at the same time.
Using a new DRM_SYNCOBJ_QUERY_FLAGS_ERROR on all signaled syncobj as separate way to query if there was an error should work for you in the meantime?
@Yicong any more questions or do you got the idea?
So to confirm, I should implement a flag DRM_SYNCOBJ_WAIT_FLAGS_ERROR which would make the DRM_IOCTL_SYNCOBJ_WAIT ioctl just wait until any fence returns an error, then return the error code of that syncobj/fence's first error, and then return 0 if everything completes without any errors? and add flag DRM_SYNCOBJ_QUERY_FLAGS_ERROR which would make the DRM_IOCTL_SYNCOBJ_QUERY ioctl fill out the points array with the error codes of each syncobj instead of the latest timeline point? Should it leave the entry as 0 for syncobjs with no error or leave it as it would be without the flag? And if it has multiple fences with errors it should just return the latest error right?
Good point, poll() has a POLLERR flag for that but I have no idea if eventfd supports that in any way. So potentially doable as well but a bit more work.
Okay, that sounds like somewhere I could potentially implement similar functionality for poll() in a follow-up patch later in the future Thank you! - Yicong
