From 5e32e8c962da237772c78df7654897acfd4787f7 Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Tue, 9 Aug 2022 13:27:10 +0300 Subject: [PATCH] v3dv: Enable sync_fd importing/exporting on Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vk_common_AcquireImageANDROID and vk_common_QueueSignalReleaseImageANDROID expect sync_fd import/export to be enabled, otherwise they crashes while trying to ImportSemaphoreFdKHR() / GetSemaphoreFdKHR(). Features was disabled on Linux to skip sync_fd CTS tests, which is using late vkEvent signalling which causes deadlock / dEQP timeout on v3dv. One of the options was implementing blocking v3dv-specific AcquireImageANDROID / QueueSignalReleaseImageANDROID to avoid importing / exporting sync_fd, but since these features are also required by CDD for Vulkan 1.1 and above, it was decided to enable the extensions for Android in exchange of a few failed dEQP tests (which should not cause any issues in non-dEQP scenarious). Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6977 Fixes: 316728a55bc8 ("v3dv: Switch to the common submit framework") Signed-off-by: Roman Stratiienko Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/vulkan/v3dv_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 6681ba32b4e..50ac6fd470a 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -863,6 +863,7 @@ physical_device_init(struct v3dv_physical_device *device, */ device->drm_syncobj_type.features &= ~VK_SYNC_FEATURE_TIMELINE; +#ifndef ANDROID /* Sync file export is incompatible with the current model of execution * where some jobs may run on the CPU. There are CTS tests which do the * following: @@ -888,6 +889,7 @@ physical_device_init(struct v3dv_physical_device *device, */ device->drm_syncobj_type.import_sync_file = NULL; device->drm_syncobj_type.export_sync_file = NULL; +#endif /* Multiwait is required for emulated timeline semaphores and is supported * by the v3d kernel interface.