Mesa (master): panfrost: Align BO size to 4096 bytes
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 13 00:23:04 UTC 2021
Module: Mesa
Branch: master
Commit: c8620005d24ea01dd237dbef452aa9ea401beb54
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8620005d24ea01dd237dbef452aa9ea401beb54
Author: Icecream95 <ixn at disroot.org>
Date: Tue Jan 19 23:40:26 2021 +1300
panfrost: Align BO size to 4096 bytes
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10158>
---
src/panfrost/lib/pan_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/panfrost/lib/pan_bo.c b/src/panfrost/lib/pan_bo.c
index 80239a9c241..dbfce02e519 100644
--- a/src/panfrost/lib/pan_bo.c
+++ b/src/panfrost/lib/pan_bo.c
@@ -364,7 +364,7 @@ panfrost_bo_create(struct panfrost_device *dev, size_t size,
assert(size > 0);
/* To maximize BO cache usage, don't allocate tiny BOs */
- size = MAX2(size, 4096);
+ size = ALIGN_POT(size, 4096);
/* GROWABLE BOs cannot be mmapped */
if (flags & PAN_BO_GROWABLE)
More information about the mesa-commit
mailing list