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 <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19971>
This commit is contained in:
Alyssa Rosenzweig 2022-11-20 22:02:16 -05:00 committed by Marge Bot
parent 860f5d77c6
commit 7c8e3963bd

View file

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