EPOLL for drm_syncfile (was Re: [PATCH 4/4] RFC: dma-buf: Add an API for importing sync files (v6))

Christian König christian.koenig at amd.com
Sun May 23 17:15:57 UTC 2021


Hi guys,

separating that discussion out since Daniel had a rather interesting 
idea here.

Am 22.05.21 um 22:05 schrieb Daniel Stone:
> [SNIP]
> Anyway, the problem with syncobj is that the ioctl to wait for a
> sync_file to materialise for a given timeline point only allows us to
> block with a timeout; this is a non-starter, because we need something
> which fits into epoll. The most optimal case is returning a new
> eventfd or similar which signals when a given timeline point becomes
> available or signaled, but in extremis a syncobj FD becoming readable
> when any activity which would change the result of any zero-timeout
> wait on that syncobj is more or less workable.
>

I think the tricky part is to epoll for a certain value.

Not sure how eventfd is supposed to work, but IIRC we don't have the 
functionality to poll for a certain value/offset etc to become available.

We could of course create a separate fd for each requested value to poll 
for thought, but that sounds like a bit much overhead to me.

Apart from that this is a really interesting idea.

Regards,
Christian.




More information about the dri-devel mailing list