[PATCH 2/4] present: don't vblank abort pending flip during window destruction

Keith Packard keithp at keithp.com
Fri Apr 25 16:39:55 PDT 2014


Frank Binns <frank.binns at imgtec.com> writes:

> As part of present's window destroy function, any vblanks associated with
> the destroyed window are aborted and destroyed. However, this can include
> a pending flip. This means that when the corresponding flip event is
> finally processed it gets ignored. As a result, any deferred unflip is
> never performed and, more importantly, the now idle pixmap is never
> destroyed. This results in a leak between server resets.
>
> Fix this by preventing any pending flip, associated with the window being
> destroyed, from being aborted and destroyed during window destruction.

Yeah, we can't do that -- the whole point of the present_abort_vblank is
to make sure everything associated with that vblank is gone before the
serve resets. We don't have any guarantee that the notify will be
received before the server has reset.

So, what we need to do is to have present_abort_vblank do all of the
related clean up, including setting the window pixmaps and freeing the
pixmap so that it doesn't get leaked. We can assume that the driver will
hold a reference to any data structures related to the scanout until
it's actually freed and not do that up in DIX as well.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140425/339ba957/attachment.sig>


More information about the xorg-devel mailing list