v3dv: revert the decision that the command buffer takes ownership of BOs

The CLs in the command buffer will reference BOs allocated by the application
such as images and buffers, that will be destroyed by the application, so
destroying them with the command buffer won't be correct.

For now, let's just assume that the comman buffer only owns the BOs
it explicitly allocates and that other abstractions own their own
BOs and are responsible from freeing them.

In the future, we might consider a ref/unref system similar to v3d's, but
for now this should work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
diff --git a/src/broadcom/vulkan/v3dv_cl.c b/src/broadcom/vulkan/v3dv_cl.c
index 4debcd3..4436fc7 100644
--- a/src/broadcom/vulkan/v3dv_cl.c
+++ b/src/broadcom/vulkan/v3dv_cl.c
@@ -54,7 +54,10 @@
 void
 v3dv_cl_destroy(struct v3dv_cl *cl)
 {
-   /* The CL's BO is owned by the command buffer, so don't free it here */
+   if (cl->bo) {
+      assert(cl->cmd_buffer);
+      v3dv_bo_free(cl->cmd_buffer->device, cl->bo);
+   }
 
    /* Leave the CL in a reset state to catch use after destroy instances */
    v3dv_cl_init(NULL, cl);
@@ -79,7 +82,6 @@
       }
    }
 
-   /* The command buffer takes ownership of the BO */
    v3dv_cmd_buffer_add_bo(cl->cmd_buffer, bo);
 
    bool ok = v3dv_bo_map(cl->cmd_buffer->device, bo, bo->size);
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index 5a5001e..03421aa 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -109,12 +109,20 @@
    v3dv_cl_destroy(&cmd_buffer->rcl);
    v3dv_cl_destroy(&cmd_buffer->indirect);
 
+   /* Since we don't ref BOs, when we add them to the command buffer, don't
+    * unref them here either.
+    */
+#if 0
    set_foreach(cmd_buffer->bos, entry) {
       struct v3dv_bo *bo = (struct v3dv_bo *)entry->key;
       v3dv_bo_free(cmd_buffer->device, bo);
    }
+#endif
    _mesa_set_destroy(cmd_buffer->bos, NULL);
 
+   v3dv_bo_free(cmd_buffer->device, cmd_buffer->tile_alloc);
+   v3dv_bo_free(cmd_buffer->device, cmd_buffer->tile_state);
+
    vk_free(&cmd_buffer->pool->alloc, cmd_buffer);
 }