Mesa (master): panfrost: AFBC buffers must be cache-line aligned

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 16 14:23:05 UTC 2019


Module: Mesa
Branch: master
Commit: e65e3cf596f1a3d0ac1e7bfdd28ebc3b72b4558e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e65e3cf596f1a3d0ac1e7bfdd28ebc3b72b4558e

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Mon Jul 15 15:34:50 2019 -0700

panfrost: AFBC buffers must be cache-line aligned

Fixes a DATA_INVALID_FAULT when AFBC is paried with mipmapping.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/gallium/drivers/panfrost/pan_resource.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index e630f1b579a..7b46acaf58b 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -287,6 +287,11 @@ panfrost_setup_slices(struct panfrost_resource *pres, size_t *bo_size)
                         /* We don't need to align depth */
                 }
 
+                /* Align levels to cache-line as a performance improvement for
+                 * linear/tiled and as a requirement for AFBC */
+
+                offset = ALIGN_POT(offset, 64);
+
                 slice->offset = offset;
 
                 /* Compute the would-be stride */




More information about the mesa-commit mailing list