Mesa (main): asahi: Remove obnoxious workaround

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 23:46:49 UTC 2021


Module: Mesa
Branch: main
Commit: 3b108393a2ae031af9cab6b47f0d5be104519162
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b108393a2ae031af9cab6b47f0d5be104519162

Author: Alyssa Rosenzweig <alyssa at rosenzweig.io>
Date:   Sat Nov 13 14:26:57 2021 -0500

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 at rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>

---

 src/asahi/lib/agx_device.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/asahi/lib/agx_device.c b/src/asahi/lib/agx_device.c
index 18f5353c636..7dd0ca603e1 100644
--- a/src/asahi/lib/agx_device.c
+++ b/src/asahi/lib/agx_device.c
@@ -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);



More information about the mesa-commit mailing list