[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    Re: [PATCH 2/4] present: don't vblank abort pending flip during window destruction
From:       Keith Packard <keithp () keithp ! com>
Date:       2014-04-30 17:20:09
Message-ID: 86bnvivinq.fsf () hiro ! keithp ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Frank Binns <frank.binns@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@intel.com

[Attachment #5 (application/pgp-signature)]

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic