https://bugs.freedesktop.org/show_bug.cgi?id=38800
--- Comment #33 from Simon Farnsworth simon.farnsworth@onelan.co.uk 2011-07-07 10:46:36 PDT --- (In reply to comment #31)
(In reply to comment #30)
So wait for bo to be idle before waiting to be out of vblank
Bad idea I'm afraid: Consider the case where the ioctl is called outside of vblank, but by the time the BO is idle we're in vblank. We'd need to (probably needlessly) wait for a full frame before the flip takes effect.
Against that, and arguing in favour of Jerome's method: if userspace is submitting enough rendering that the BO goes idle just as vblank starts, it's already on a performance knife-edge. We're just arguing about which way to push you if you're already on that knife-edge.
As Jerome's method is guaranteed to at least accurately report the timestamps of page flips, it's probably the right way to push you; I've been caught up in other issues today, but I'll try to code up an RFC patch for Jerome's idea tomorrow.