From: sashiko-bot@kernel.org
To: "Alexandru Dadu" <alexandru.dadu@imgtec.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 5/6] drm/imagination: Generalize FW segment loading
Date: Fri, 04 Dec 2026 07:58:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-249353@kernel.org> (raw)
In-Reply-To: <20261204-b4-commonize-fw-segment-loading-v3-5-84b4435fb634@imgtec.com>
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 <opensource@mtcoster.net>
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/imagination/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 @@
>
> #include <drm/drm_mm.h>
>
> +#include <linux/array_size.h>
> #include <linux/types.h>
>
> /* Forward declarations from "pvr_device.h". */
> @@ -136,6 +137,23 @@ struct pvr_fw_metadata {
> struct pvr_fw_section_desc sections[] __counted_by(num_sections);
> };
>
> +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_SEGMENT_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 <linux/array_size.h> in
pvr_fw.h is also unused since ARRAY_SIZE() is not referenced there.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-b4-commonize-fw-segment-loading-v3-0-84b4435fb634@imgtec.com?part=5
next prev parent reply other threads:[~2026-12-04 7:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 7:41 [PATCH v3 0/6] drm/imagination: Commonize firmware segment loading Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 7:41 ` [PATCH v3 1/6] drm/imagination: Remove get_fw_obj_gpu_addr() Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 7:41 ` [PATCH v3 2/6] drm/imagination: Fix size of FW header members Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 7:41 ` [PATCH v3 3/6] drm/imagination: Save metadata from firmware Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 8:03 ` sashiko-bot
2026-12-04 7:41 ` [PATCH v3 4/6] drm/imagination: Release firmware after init Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 7:41 ` [PATCH v3 5/6] drm/imagination: Generalize FW segment loading Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
2026-12-04 7:58 ` sashiko-bot [this message]
2026-12-04 7:41 ` [PATCH v3 6/6] drm/imagination: Avoid loop in configure_seg_mmu() Alexandru Dadu
2026-12-04 7:41 ` Alexandru Dadu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-249353@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexandru.dadu@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.