From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E4FC606A322 for ; Fri, 4 Dec 2026 07:58:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MxXrz4eE Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84AF0112CF7; Fri, 4 Dec 2026 07:58:52 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FBED112CF7 for ; Fri, 4 Dec 2026 07:58:46 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 4DC17605EA; Fri, 4 Dec 2026 07:58:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9A001F000C2; Fri, 4 Dec 2026 07:58:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796371125; bh=LJlOvSGhJ7gcjxB8oBm8hCHAF486hbWIOMRXYYAbE0E=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=MxXrz4eEsdMFa4Xt6w6BXuFw40Gbkq+A3ub00gI2+xUzLK2pQ3jDACRYVx5CnOnl+ ZQmw8sGId2kfRdok4f+c401mATJWFqxZwSm1xWjWpkr9xTnzLrKCK1+XzKs3Dnm1um lKWSlWpbGQeSQIqOIg4IgTs+EMNnQgxgEzaQ0wYGykhnOmejvvoNv33CsYlnzstJgM PFlM+grGD6HFUH9LUUnZDvja/v+WcvuzecZY05UQveOt2PWNQZzwbFoNTZ9egMYzv2 VsOej8RKsjTlrOBFKbxRKw+B/PcSYKUfXEr5VXkK6n86YJsQPXrhEhDUJ0RW1uNFfd HN1RZemmXiUZw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 5/6] drm/imagination: Generalize FW segment loading To: "Alexandru Dadu" Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261204-b4-commonize-fw-segment-loading-v3-5-84b4435fb634@imgtec.com> References: <20261204-b4-commonize-fw-segment-loading-v3-0-84b4435fb634@imgtec.com> <20261204-b4-commonize-fw-segment-loading-v3-5-84b4435fb634@imgtec.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 07:58:44 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] drm/imagination: unused segment id field, export, and header include -- commit 06c45217537b0716e7b345dc883f7cc0ee836104 Author: Matt Coster drm/imagination: Generalize FW segment loading This commit replaces the per-segment firmware allocation, mapping, and cleanup fields in struct pvr_fw_mem with an array of struct pvr_fw_segment entries driven by a descriptor table, updating the META, MIPS, RISC-V, and ELF loader paths to accept the segment array. > diff --git a/drivers/gpu/drm/imagination/pvr_fw.h b/drivers/gpu/drm/imagi= nation/pvr_fw.h > index 45b38d9072a1f..15e0cbe71a341 100644 > --- a/drivers/gpu/drm/imagination/pvr_fw.h > +++ b/drivers/gpu/drm/imagination/pvr_fw.h > @@ -9,6 +9,7 @@ > =20 > #include > =20 > +#include > #include > =20 > /* Forward declarations from "pvr_device.h". */ > @@ -136,6 +137,23 @@ struct pvr_fw_metadata { > struct pvr_fw_section_desc sections[] __counted_by(num_sections); > }; > =20 > +struct pvr_fw_segment { > + enum pvr_fw_segment_name id; > + u32 size; > + struct pvr_fw_object *obj; > + void *host_copy; > +}; > + > +struct pvr_fw_segment_desc { > + const char *name; > + bool required; > + void *(*create_and_map)(struct pvr_device *pvr_dev, > + struct pvr_fw_segment *segment, > + u32 fixed_data_addr); > +}; > + > +extern const struct pvr_fw_segment_desc pvr_fw_segment_descs[PVR_FW_SEGM= ENT_COUNT]; > + [Severity: Low] Is the new id field in struct pvr_fw_segment needed? pvr_fw_process() populates it, but nothing in the driver reads segment->id and the commit message does not explain what it is for. Also, pvr_fw_segment_descs is only referenced inside pvr_fw.c, so both struct pvr_fw_segment_desc and pvr_fw_segment_descs can be static and kept private to pvr_fw.c. The new #include in pvr_fw.h is also unused since ARRAY_SIZE() is not referenced there. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-b4-commoni= ze-fw-segment-loading-v3-0-84b4435fb634@imgtec.com?part=3D5