[RFC PATCH] drm/syncobj: add IOCTL to register an eventfd for a timeline

Simon Ser contact at emersion.fr
Mon Oct 10 09:20:21 UTC 2022


On Monday, October 10th, 2022 at 10:19, Pekka Paalanen <ppaalanen at gmail.com> wrote:

> I'm completely clueless about this API.

No worries!

> > +/**
> > + * struct drm_syncobj_timeline_register_eventfd
> > + *
> > + * Register an eventfd to be signalled when a timeline point completes. The
> > + * eventfd counter will be incremented by one.
> 
> Sounds nice.
> 
> Since the action is to increment the counter by one, does it mean it
> will be possible to wait for a bunch of completions and have the
> eventfd poll return only when they have all signaled?

It is possible to perform the IOCTL multiple times with the same eventfd, but
eventfd semnatics would wake up user-space each time any timeline point
completes.

> > + */
> > +struct drm_syncobj_timeline_register_eventfd {
> > +	__u32 handle;
> 
> Handle of what?

drm_syncobj handle

> > +	__u32 flags;
> 
> What flags are allowed? Must be zero for now?

Same flags as the wait IOCTL.

Must be WAIT_AVAILABLE for now, but I'll implement the zero case as well (see
TODO).

> > +	__u64 point;
> 
> Is this some Vulkan thingy?

It's a drm_syncobj timeline thing. The timeline contains multiple sync points.

> > +	__s32 fd;
> 
> I guess the userspace needs to create an eventfd first, and pass it as
> the argument here? This is not creating a new eventfd itself?

Correct

> > +	__u32 pad;
> 
> Must be zero?

Indeed.

I'll spell out these requirements explicitly in the next version.


More information about the dri-devel mailing list