From: Alyssa Rosenzweig Date: Mon, 15 Jul 2019 22:34:50 +0000 (-0700) Subject: panfrost: AFBC buffers must be cache-line aligned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e65e3cf596f1a3d0ac1e7bfdd28ebc3b72b4558e;p=mesa.git panfrost: AFBC buffers must be cache-line aligned Fixes a DATA_INVALID_FAULT when AFBC is paried with mipmapping. Signed-off-by: Alyssa Rosenzweig --- 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 */