From 2d728a037a4d4b0ec7cd1443be82783d9e15bfcb Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Mon, 1 Jul 2024 09:31:53 -0700 Subject: [PATCH] venus: tentative fix for test flakiness from invalid ring wait If ring is already current when creating bo, we skip the ring wait but miss to invalidate bo ring seqno. There's a false-positive for sending a ring wait upon free memory if the ring has consumed about UINT32_MAX bytes of traffic (unrelated to ring size). Signed-off-by: Yiwei Zhang Part-of: --- src/virtio/vulkan/vn_device_memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/virtio/vulkan/vn_device_memory.c b/src/virtio/vulkan/vn_device_memory.c index db87692ea59..a7434c2953b 100644 --- a/src/virtio/vulkan/vn_device_memory.c +++ b/src/virtio/vulkan/vn_device_memory.c @@ -62,6 +62,9 @@ vn_device_memory_wait_alloc(struct vn_device *dev, if (!mem->bo_ring_seqno_valid) return VK_SUCCESS; + /* fine to false it here since renderer submission failure is fatal */ + mem->bo_ring_seqno_valid = false; + /* no need to wait for ring if * - mem alloc is done upon bo map or export * - mem import is done upon bo destroy @@ -69,9 +72,6 @@ vn_device_memory_wait_alloc(struct vn_device *dev, if (vn_ring_get_seqno_status(dev->primary_ring, mem->bo_ring_seqno)) return VK_SUCCESS; - /* fine to false it here since renderer submission failure is fatal */ - mem->bo_ring_seqno_valid = false; - const uint64_t ring_id = vn_ring_get_id(dev->primary_ring); uint32_t local_data[8]; struct vn_cs_encoder local_enc =