From 7c8e3963bdaaeb8bd43a9d1d75ade99e3962ffeb Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 20 Nov 2022 22:02:16 -0500 Subject: [PATCH] asahi: Stop aligning pool allocations to 4KiB This defeats the point of specifying alignments and of packing allocations together with the BO cache. We're a real driver now, let's allocate memory like one. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/pool.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/asahi/lib/pool.c b/src/asahi/lib/pool.c index 8d0da25bced..81cf7070e51 100644 --- a/src/asahi/lib/pool.c +++ b/src/asahi/lib/pool.c @@ -82,7 +82,6 @@ struct agx_ptr agx_pool_alloc_aligned_with_bo(struct agx_pool *pool, size_t sz, unsigned alignment, struct agx_bo **out_bo) { - alignment = MAX2(alignment, 4096); assert(alignment == util_next_power_of_two(alignment)); /* Find or create a suitable BO */ @@ -120,7 +119,6 @@ agx_pool_upload_aligned_with_bo(struct agx_pool *pool, const void *data, size_t sz, unsigned alignment, struct agx_bo **bo) { - alignment = MAX2(alignment, 4096); struct agx_ptr transfer = agx_pool_alloc_aligned_with_bo(pool, sz, alignment, bo); memcpy(transfer.cpu, data, sz);