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

Olivier Fourdan ofourdan at redhat.com
Thu Oct 18 13:10:54 UTC 2018


Hi,

On Mon, Oct 8, 2018 at 4:46 PM Olivier Fourdan <ofourdan at redhat.com> 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


More information about the xorg-devel mailing list