wl_buffer is not released for long time.

Pekka Paalanen ppaalanen at gmail.com
Wed Mar 14 08:49:22 UTC 2018


On Tue, 13 Mar 2018 14:11:29 +0000
Sichem Zhou <sichem.zh at gmail.com> wrote:

> Dear Matt,
> 
> I just checked my compiled version, indeed I was using a version without
> this patch. I patched my local weston but it didn't seem that my problem is
> gone. So I guess there could be other problems with my code, but thanks for
> your assistance. Now I can insert the callback in weston to do some
> inspection.

Hi,

note that there is no guarantee to get a wl_buffer.release until you
have wl_surface.committed the next wl_buffer. A compositor could send a
release without a new buffer, but that is only possible is the
compositor made a copy of the buffer contents. Compositors try to avoid
such copies.

It didn't sound like this was your issue, but just reminding.

It sounds more like the compositor might be blocked unnecessarily
somewhere, and getting input events will let its main event loop
un-block. This shouldn't happen, but there could be bugs.


Thanks,
pq

> Le lun. 12 mars 2018 19 h 22, Matt Hoosier <matt.hoosier at gmail.com> a
> écrit :
> 
> > Here's the discussion and patch that addressed the issue I was mentioning:
> >
> >
> > https://lists.freedesktop.org/archives/wayland-devel/2017-September/035191.html
> >
> > On Mon, Mar 12, 2018 at 3:51 PM, Matt Hoosier <matt.hoosier at gmail.com>
> > wrote:  
> > > Hi,
> > >
> > > Unless you're using an unreleased version of Weston, I think you're
> > > probably running into a bug that we fixed a few months ago in which
> > > wl_buffer::release() events were prone to sit undispatched in the
> > > server's outgoing queue until some other event happened to need
> > > transmitted.
> > >
> > > -Matt
> > >
> > > On Mon, Mar 12, 2018 at 1:23 PM, Sichem Zhou <sichem.zh at gmail.com>  
> > wrote:  
> > >> Hi all,
> > >>
> > >> Dear wayland devs, I have a question regarding to double `wl_buffer`
> > >> management. I don't seem to have wl_buffer released untill some other  
> > events  
> > >> triggered (for example, the  inputs). My current environment is under
> > >> `X11-backend` and a libweston based compositor.
> > >>
> > >> My pipeline follows: (frame, attach, damage, commit) -> buffer switch ->
> > >> wait until one buffer available -> redraw. The `done` event is handled
> > >> differently since it only signals if ready to draw.
> > >>
> > >> Through my experiments, I found out at I wouldn't get either of the
> > >> `release` of `frame done` event if I wasn't using the compositor (moving
> > >> cursor or typing). In this case I guess there is something wrong with my
> > >> pipeline but I couldn't figure out which. I wish to know if there is  
> > obvious  
> > >> mistakes in my pipeline or the problem lies in the compositor.
> > >>
> > >>  Very appreciate any answers.
> > >>
> > >> SZ
> > >>
> > >>
> > >>
> > >> _______________________________________________
> > >> wayland-devel mailing list
> > >> wayland-devel at lists.freedesktop.org
> > >> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
> > >>  
> >  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180314/372768bb/attachment.sig>


More information about the wayland-devel mailing list