yegl/wayland: fix glthread deadlocks
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 24 Jan 2023 20:42:49 +0000 (21:42 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 13 Mar 2023 18:28:15 +0000 (18:28 +0000)
commita98e4195f567b39af9fd8a6cfccec6f772efe9fc
tree5d612cbac58a12e90a4c98d44aacee036950b90b
parent95e8be29a72d4db6a4b3a9ca36ec5e0ee6e0f1ee
yegl/wayland: fix glthread deadlocks

We need to make sure that glthread is idle before using wl_*
functions or they might be used from 2 threads at the same
time.

Thanks to @deltib for the investigation of this issue.

Fixes: 58f90fd03f4 ("egl/wayland: fix glthread crashes")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7624
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8136
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20887>
src/egl/drivers/dri2/platform_wayland.c