From 95579b7af6a38267f8234bbb63580106c6a0eb72 Mon Sep 17 00:00:00 2001 From: Qiang Yu Date: Tue, 9 Sep 2025 14:24:56 +0800 Subject: [PATCH] panfrost: fix image plane array copy Reference the original code, each plane resource have the same image plane array. Fixes: 53e5e07c4b7 ("pan: Add the concept of modifier handler") Reviewed-by: Boris Brezillon Reviewed-by: Eric R. Smith Acked-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/panfrost/pan_resource.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 03783cb79cf..549380fdecb 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -141,11 +141,9 @@ panfrost_resource_init_image( assert(plane_idx == util_format_get_num_planes(iprops->format)); - plane_idx = 1; for (struct panfrost_resource *plane = pan_resource(rsc->base.next); plane; plane = pan_resource(plane->base.next)) { - memcpy(plane->image.planes, rsc->image.planes, - plane_idx * sizeof(plane->image.planes[0])); + memcpy(plane->image.planes, rsc->image.planes, sizeof(plane->image.planes)); } return true;