aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorDanylo Piliaiev <[email protected]>2020-05-12 12:27:58 +0300
committerMarge Bot <[email protected]>2020-05-14 13:14:57 +0000
commit06b6c687e2aba075e9fc3812d80c128bd873bbce (patch)
tree846dc7a362c5ef8182fcaff2e0a325f0fa5b5656 /src/intel/vulkan
parentc059b2270724b2c02416d7d7d45e23a5e994cda5 (diff)
anv: Fix deadlock in anv_timelines_wait
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2945 Fixes: 34f32a6d6648073e2fda3fb78377124fb32bb288 Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5005>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index 0fdabf7aa00..009675e23ea 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -2246,9 +2246,10 @@ anv_timelines_wait(struct anv_device *device,
uint64_t abs_timeout_ns)
{
if (!wait_all && n_timelines > 1) {
+ pthread_mutex_lock(&device->mutex);
+
while (1) {
VkResult result;
- pthread_mutex_lock(&device->mutex);
for (uint32_t i = 0; i < n_timelines; i++) {
result =
anv_timeline_wait_locked(device, timelines[i], serials[i], 0);