Do not allow queuing events too far into the the future. The result can be a presentation freeze until the msc time is reached.
At the moment clients might do this per accident, because the fake vblank code in Present and the xfree86 driver tolerate high 64bit msc values without freeze due to an erroneous 64 to 32bit conversion. The sample client, that triggers this behavior, is the Steam client. Signed-off-by: Roman Gilg <subd...@gmail.com> --- hw/xwayland/xwayland-present.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index 27bc569..c0bc1f0 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -303,6 +303,11 @@ xwl_present_queue_vblank(WindowPtr present_window, if (!xwl_window) return BadMatch; + if (msc > xwl_window->present_msc + 100) { + ErrorF("Client queued frame too far in the future: %lu -> %lu\n", xwl_window->present_msc, msc); + return BadRequest; + } + if (xwl_window->present_crtc_fake != crtc) return BadRequest; -- 2.7.4 _______________________________________________ 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