dri3: Stricter SBC wraparound handling
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 8 May 2018 09:51:09 +0000 (11:51 +0200)
committerMichel Dänzer <michel@daenzer.net>
Tue, 22 May 2018 15:59:53 +0000 (17:59 +0200)
commitfe2edb25dd5628c395a65b60998f11e839d2b458
treedf6a4c9e9bbde03c789b940f675e09069fb4b169
parent75e919c0454dcc759dce69c46717356980f18fd8
dri3: Stricter SBC wraparound handling

Prevents corrupting the upper 32 bits of draw->recv_sbc when
draw->send_sbc resets to 0 (which currently happens when the window is
unbound from a context and bound to one again), which in turn caused
loader_dri3_swap_buffers_msc to calculate target_msc with corrupted
upper 32 bits. This resulted in hangs with the Xorg modesetting driver
as of xserver 1.20 (older versions and other drivers ignored the upper
32 bits of the target MSC, which is why this wasn't noticed earlier).

Cc: mesa-stable@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/106351
Tested-by: Mike Lothian <mike@fireburn.co.uk>
src/loader/loader_dri3_helper.c