From 8e18402eb1033f6ebb5c5894dce71681c87ea832 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Tue, 20 May 2025 09:48:52 +0200 Subject: [PATCH] pan/layout: Don't align WSI import offset If the offset is considered valid by wsi_row_pitch_to_row_stride() we should use it as-is, even if it's suboptimal. Signed-off-by: Boris Brezillon Tested-by: Eric R. Smith Reviewed-by: Eric R. Smith Reviewed-by: Mary Guillemard Part-of: --- src/panfrost/lib/pan_layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/lib/pan_layout.c b/src/panfrost/lib/pan_layout.c index da63b1c6d41..7ab3951a218 100644 --- a/src/panfrost/lib/pan_layout.c +++ b/src/panfrost/lib/pan_layout.c @@ -351,7 +351,8 @@ pan_image_layout_init(unsigned arch, const struct pan_image_props *props, /* Align levels to cache-line as a performance improvement for * linear/tiled and as a requirement for AFBC */ - offset_B = ALIGN_POT(offset_B, pan_image_slice_align(props->modifier)); + if (!wsi_layout) + offset_B = ALIGN_POT(offset_B, pan_image_slice_align(props->modifier)); slice->offset_B = offset_B;