Skip to content

vulkan/wsi: fix possible random stalls in wsi_display_wait_for_event

Marcin Ślusarz requested to merge mslusarz/mesa:wsi_display_wait_fix into master

pthread_cond_broadcast man page says this:

"The pthread_cond_broadcast() or pthread_cond_signal() functions may be called by a thread whether or not it currently owns the mutex that threads calling pthread_cond_wait() or pthread_cond_timedwait() have associated with the condition variable during their waits; however, if predictable scheduling behavior is required, then that mutex shall be locked by the thread calling pthread_cond_broadcast() or pthread_cond_signal()."

Found by reading the code. Compile tested only.

Fixes: da997ebe ("vulkan: Add KHR_display extension using DRM [v10]")

Edited by Marcin Ślusarz

Merge request reports