Module: Mesa
Branch: main
Commit: 5e32e8c962da237772c78df7654897acfd4787f7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e32e8c962da237772c78df7654897acfd4787f7

Author: Roman Stratiienko <[email protected]>
Date:   Tue Aug  9 13:27:10 2022 +0300

v3dv: Enable sync_fd importing/exporting on Android

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 <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18047>

---

 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.

Reply via email to