[PATCH xserver 0/2] RE: xwayland: Avoid assert failure in flips_stop()

Olivier Fourdan ofourdan at redhat.com
Thu Sep 27 15:31:04 UTC 2018


Hi Roman,

On Fri, Sep 21, 2018 at 11:53 AM Roman Gilg <subdiff at gmail.com> wrote:
>
> Great detailed analysis in the backtrace! :)
>
> What confused me at first was that the present_wnmd_flips_stop function
> is called at all in this state because it should only be called when at
> least one flip has been done and in this case xwl_window->present_window
> must have been set to the presenting (child) window.
>
> I believe now the root problem is that the window did in fact some flips
> in the past, but on the reparent operation a new parent window with a
> new xwl_window struct is set, which then has a different present_window
> value. That means when reparenting of a child window with flips the
> xwl_window->present_window values must be updated on the old parent
> (to NULL) and on the new parent (to the new child window). Or more
> generic this must be done on any unmap/map operation.
>
> One extra case must be considered: if there is already a different
> child window doing flips on the new parent window the reparented child
> window must be instructed to stop its flips.

So the following two patches are my attempt at implementing your suggestion,
but I am not familiar with Present so this is a bit of a shot in the dark
for me, also because that issue is quite difficult to reproduce.

Those patches have been barely tested, expect dragons!

Anyway, please let me know if that's what you had in mind...

Cheers,
Olivier

Olivier Fourdan (2):
  present: cancel flip on reparenting
  xwayland: update Xwayland present window on reparent

 hw/xwayland/xwayland-present.c | 16 ++++++++++++++++
 hw/xwayland/xwayland.c         | 23 +++++++++++++++++++++++
 hw/xwayland/xwayland.h         |  2 ++
 present/present_priv.h         |  3 +++
 present/present_scmd.c         |  1 +
 present/present_screen.c       | 16 ++++++++++++++++
 present/present_wnmd.c         | 17 +++++++++++++++++
 7 files changed, 78 insertions(+)

-- 
2.19.0



More information about the xorg-devel mailing list