[PATCH 2/4] present: don't vblank abort pending flip during window destruction
keithp at keithp.com
Wed Apr 30 10:20:09 PDT 2014
Frank Binns <frank.binns at imgtec.com> writes:
> present_flip_destroy() suggests that there can be a pending flip at
> screen close time. In this case, an unflip is scheduled to be done once
> the flip event comes through. However, without this patch the event
> gets ignored, due to present_abort_vblank() being called on the
> pending flip, meaning that the unflip is never performed.
We need to perform all of the DIX-related unflip work when the flip is
destroyed. That DDX has a pending flip isn't important; we can expect it
to deal with that in some fashion.
We really can't handle having any events pending across server reset as
the screen structure and all of the associated data will be freed, so
there's no place to hang any of the related data.
> Interestingly, there is a comment in present_flip_destroy() that says
> "XXX this needs to be synchronous for server reset". Presumably
> this is related to the need to wait for the pending flip event to come
> through so that the unflip can be performed. We achieve this in the
> PVR video driver by having our own close screen function that waits
> for any pending events to come through.
No, we don't need to wait for the event to appear; we need to clean
things up so that any pending event will have nothing left to do and can
be safely discarded.
> From what you've said, this is the wrong approach. However, how
> do we then perform the unflip given that we need to wait for the
> pending flip to complete before it can be done?
There's no need to wait if there's nothing to do.
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 810 bytes
Desc: not available
More information about the xorg-devel