[PATCH] present: Query the right CRTC to use each time

Chris Wilson chris at chris-wilson.co.uk
Mon Jun 2 23:03:44 PDT 2014

On Mon, Jun 02, 2014 at 09:10:47PM -0700, Keith Packard wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> > (That the client can get confused and present on the wrong CRTC is
> > an unfortunate race condition, but there needs to be a way to poll for
> > XErrors alongside the futex signalling in order to catch when the futex
> > will never be woken and abort.)
> Perhaps we should actually signal the futex even if an error is
> generated? That would be a bit unusual, but could avoid this problem.

I don't think it is possible. The sync-fence is associated with the
scanout Pixmap. We present the next Pixmap believing that it will take
over and free the current scanout and so signal the old sync-fence. The
more I look at it, it is just the client being too naive - it just feels
like it should be possible to poll(futex_fd, xcb_fd) rather than block
on either and so make writing tests easier!

Chris Wilson, Intel Open Source Technology Centre

More information about the xorg-devel mailing list