[PATCH xserver 0/2] RFC: implement and use `present_event_abandon()`

Olivier Fourdan ofourdan at redhat.com
Mon Oct 8 14:46:31 UTC 2018


Hi,

I reckon https://bugs.freedesktop.org/show_bug.cgi?id=108249 ("[xwayland]
Crash in Xpresent code on resume from suspend") is caused by the present
code using a RRCrtcPtr previously freed by Xwayland.

Reason for this is because Xwayland's `xwl_output_remove()` will destroy
the RRCrtcPtr for the Wayland outputs when removed, but if there is a
flip pending, the `xwl_present_sync_callback()` will trigger after the
CRTC is destroyed and not much good will come out of this.

So I was tempted to use `present_event_abandon(RRCrtcPtr crtc)` which looked
like a good candidate, until I realized that there was no actual implementation
for that function declaration in present.h.

So, the two following patches are my attempt at implementing such a
`present_event_abandon()` function and make use of it in Xwayland.

There are marked as "RFC" because the Present code is still pretty much
alien territory for me...

Cheers,
Olivier

Olivier Fourdan (2):
  present: implement `present_event_abandon()`
  xwayland: abandon present events when removing CRTC

 hw/xwayland/xwayland-output.c |  3 ++-
 present/present_screen.c      | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

-- 
2.19.0



More information about the xorg-devel mailing list