asahi: Remove obnoxious workaround
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 13 Nov 2021 19:26:57 +0000 (14:26 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 18 Nov 2021 23:35:25 +0000 (23:35 +0000)
Now that we're not hardcoded any magic BO IDs, there is no minimum
number of allocations needed. Remove the unneeded -- and obnoxious --
workaround of allocating unused BOs on startup.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>

src/asahi/lib/agx_device.c

index 18f5353..7dd0ca6 100644 (file)
@@ -322,10 +322,6 @@ agx_open_device(void *memctx, struct agx_device *dev)
    dev->memctx = memctx;
    util_sparse_array_init(&dev->bo_map, sizeof(struct agx_bo), 512);
 
-   /* XXX: why do BO ids below 6 mess things up..? */
-   for (unsigned i = 0; i < 6; ++i)
-      agx_bo_alloc(dev, 4096, AGX_MEMORY_TYPE_FRAMEBUFFER);
-
    dev->queue = agx_create_command_queue(dev);
    dev->cmdbuf = agx_shmem_alloc(dev, 0x4000, true); // length becomes kernelCommandDataSize
    dev->memmap = agx_shmem_alloc(dev, 0x4000, false);