vulkan/wsi: Really terminate DRM lease in wsi_release_display().
authorMario Kleiner <mario.kleiner.de@gmail.com>
Mon, 8 Jun 2020 10:51:08 +0000 (12:51 +0200)
committerMarge Bot <eric+marge@anholt.net>
Sun, 21 Jun 2020 11:20:54 +0000 (11:20 +0000)
commit2cc51b0dfffb80e91bf839ed57708fd9f90735d9
treeebdb23d76bbb9b8e04ec349fcde458483d3044e1
parent82815bc98036ec533788e3a62c0709541eeef0b8
vulkan/wsi: Really terminate DRM lease in wsi_release_display().

wsi_release_display() implements vkReleaseDisplayEXT() which
is supposed to return control to the lessor of an output
upon call.

We need to terminate the wsi->wait_thread when close()'ing
the wsi->fd, otherwise the wait_thread holds another reference
to the wsi->fd, keeping the lease active, and thereby the
leased output blocked, until vkDestroyInstance() is called.

This gives users their GUI back, instead of extended darkness.

Fixes: 352d320a0745 ("vulkan: Add EXT_direct_mode_display [v2]")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5396>
src/vulkan/wsi/wsi_common_display.c