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 <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29988>
This commit is contained in:
Yiwei Zhang
2024-07-01 09:31:53 -07:00
committed by Marge Bot
parent de0d237ab0
commit 2d728a037a

View File

@@ -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 =