From 3a4207dde6b655b0eaa6096f21758e5943b2721b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 27 Apr 2022 11:37:40 -0400 Subject: [PATCH] panfrost: Use row stride to calculate slice size This expresses what's actually happening. Equivalent to the old calculation due to some cancellation. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/pan_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_layout.c b/src/panfrost/lib/pan_layout.c index 0d9f56c590f..32417404bfd 100644 --- a/src/panfrost/lib/pan_layout.c +++ b/src/panfrost/lib/pan_layout.c @@ -261,7 +261,7 @@ pan_image_layout_init(struct pan_image_layout *layout, slice->line_stride = row_stride / block_size.height; slice->row_stride = row_stride; - unsigned slice_one_size = slice->line_stride * effective_height; + unsigned slice_one_size = row_stride * (effective_height / block_size.height); /* Compute AFBC sizes if necessary */ if (afbc) {