asahi: Remove obnoxious workaround

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>
This commit is contained in:
Alyssa Rosenzweig 2021-11-13 14:26:57 -05:00 committed by Marge Bot
parent a28775046c
commit 3b108393a2

View 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);