On 2/17/26 15:35, Michel Dänzer wrote:
>
> Adding the wayland-devel list for Wayland compositor developers.
>
> Also adding the mesa-dev list for Mesa developers, though note that this list
> isn't really active anymore. You might want to create an MR or Gitlab issue
> to get feedback from Mesa developers.
>
>
> On 2/17/26 11:29, Christian König wrote:
>>>
>>> @@ -732,6 +732,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
>>> DRM_IOCTL_DEF(DRM_IOCTL_MODE_LIST_LESSEES, drm_mode_list_lessees_ioctl,
>>> DRM_MASTER),
>>> DRM_IOCTL_DEF(DRM_IOCTL_MODE_GET_LEASE, drm_mode_get_lease_ioctl,
>>> DRM_MASTER),
>>> DRM_IOCTL_DEF(DRM_IOCTL_MODE_REVOKE_LEASE, drm_mode_revoke_lease_ioctl,
>>> DRM_MASTER),
>>> + DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_QUERY_ERROR,
>>> drm_syncobj_query_error_ioctl,
>>> + DRM_RENDER_ALLOW),
>>
>> My educated guess is that userspace doesn't want to call this IOCTL
>> separately because of performance reasons.
>>
>> 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.
>>
>> But in general since this is not a HW feature the userspace developers need
>> to voice their requirements and explain how they want to have that
>> implemented.
>
> mutter currently doesn't use the syncobj-specific ioctls to wait for a
> syncobj (timeline point) to signal / check if it has. Instead, it uses
> drmSyncobjEventfd / drmSyncobjExportSyncFile to get an eventfd / sync_file
> representing the timeline point / fence, then checks the status of the fd and
> waits for it to signal using generic poll()-style functionality. So unless
> the error condition can be communicated via the latter (and plumbed through
> glib APIs), mutter would need to check for fence errors separately.
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.
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?
> Xwayland uses drmSyncobjTimelineWait to check if a syncobj timeline point has
> a fence / has signalled, it also uses drmSyncobjEventfd similarly to mutter
> though.
Yeah that sounds like something Yicong could tackle.
@Yicong any more questions or do you got the idea?
Regards,
Christian.