From f70ac948b9cba5b8019791fef82a315a70a37ca7 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: (cherry picked from commit 95579b7af6a38267f8234bbb63580106c6a0eb72) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_resource.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 93213c5b8a1..0a00ea3a32b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4644,7 +4644,7 @@ "description": "panfrost: fix image plane array copy", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "53e5e07c4b7caf3afaa541fef4666453c8b4c8ef", "notes": null 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;