Re: [PATCH xserver 0/2] RFC: implement and use `present_event_abandon()`
Hi, On Mon, Oct 8, 2018 at 4:46 PM Olivier Fourdan wrote: > 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... If that makes it easier for reviews/comments, I posted the same as a WIP/MR: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/45 Cheers, Olivier ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/2] RFC: implement and use `present_event_abandon()`
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 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel