diff --git a/.pick_status.json b/.pick_status.json index 57502b4bf37..5de108b4d4c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3844,7 +3844,7 @@ "description": "tu/drm/virtio: Do not free iova from heap for lazy BOs", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "88d001383a7c5b3f27c80b9b063f29db88246e29", "notes": null diff --git a/src/freedreno/vulkan/tu_knl_drm_virtio.cc b/src/freedreno/vulkan/tu_knl_drm_virtio.cc index 4dbc85d3adf..af93ad3d015 100644 --- a/src/freedreno/vulkan/tu_knl_drm_virtio.cc +++ b/src/freedreno/vulkan/tu_knl_drm_virtio.cc @@ -775,9 +775,11 @@ virtio_bo_init(struct tu_device *dev, return VK_SUCCESS; fail: - mtx_lock(&dev->vma_mutex); - util_vma_heap_free(&dev->vma, req.iova, size); - mtx_unlock(&dev->vma_mutex); + if (!lazy_vma) { + mtx_lock(&dev->vma_mutex); + util_vma_heap_free(&dev->vma, req.iova, size); + mtx_unlock(&dev->vma_mutex); + } return result; }