From e91c95dba8af9025c8eefe187a698e613ef0fc2b Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Sun, 18 Apr 2021 21:07:35 +0000 Subject: [PATCH] venus: force a roundtrip after vn_renderer_bo_create_dmabuf This is to ensure the kernel operations and the later ring operations are in the right order. Signed-off-by: Yiwei Zhang Reviewed-by: Chia-I Wu Part-of: --- src/virtio/vulkan/vn_device_memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/virtio/vulkan/vn_device_memory.c b/src/virtio/vulkan/vn_device_memory.c index 8ea53c64857..aca94999a4c 100644 --- a/src/virtio/vulkan/vn_device_memory.c +++ b/src/virtio/vulkan/vn_device_memory.c @@ -223,6 +223,7 @@ vn_AllocateMemory(VkDevice device, vk_free(alloc, mem); return vn_error(dev->instance, result); } + vn_instance_roundtrip(dev->instance); const VkImportMemoryResourceInfoMESA import_memory_resource_info = { .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_RESOURCE_INFO_MESA, @@ -435,6 +436,7 @@ vn_GetMemoryFdPropertiesKHR(VkDevice device, fd, 0, handleType, &bo); if (result != VK_SUCCESS) return vn_error(dev->instance, result); + vn_instance_roundtrip(dev->instance); VkMemoryResourcePropertiesMESA memory_resource_properties = { .sType = VK_STRUCTURE_TYPE_MEMORY_RESOURCE_PROPERTIES_MESA,