From: sashiko-bot@kernel.org
To: "Kyrie Wu" <kyrie.wu@mediatek.com>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v9 04/14] media: mediatek: vcodec: get different firmware ipi id
Date: Tue, 17 Nov 2026 03:53:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-218167@kernel.org> (raw)
In-Reply-To: <20261117032950.1425556-5-kyrie.wu@mediatek.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] media: mediatek: vcodec: fw_handler->type accessed directly by
callers
--
commit 570b1a574a8a9971d79e8070cabc43cdc4bbf018
Author: Kyrie Wu <kyrie.wu@mediatek.com>
media: mediatek: vcodec: get different firmware ipi id
This commit adds mtk_vcodec_fw_get_ipi() to select the decoder IPI ID
based on the firmware type and hardware index, and updates the stateless
decoder initialization callbacks to use it.
> diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h
> index 50d93d47b6de0..005ac9969b5bd 100644
> --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h
> +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h
> @@ -43,5 +43,6 @@ int mtk_vcodec_fw_ipi_register(struct mtk_vcodec_fw *fw, int id,
> int mtk_vcodec_fw_ipi_send(struct mtk_vcodec_fw *fw, int id,
> void *buf, unsigned int len, unsigned int wait);
> int mtk_vcodec_fw_get_type(struct mtk_vcodec_fw *fw);
> +int mtk_vcodec_fw_get_ipi(enum mtk_vcodec_fw_type type, int hw_id);
>
> #endif /* _MTK_VCODEC_FW_H_ */
> diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> index 49d9b4a72387e..84d28a0ba15a5 100644
> --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> +++ b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> @@ -1878,6 +1878,7 @@ static int vdec_av1_slice_init(struct mtk_vcodec_dec_ctx *ctx)
> {
> struct vdec_av1_slice_instance *instance;
> struct vdec_av1_slice_init_vsi *vsi;
> + enum mtk_vcodec_fw_type fw_type = ctx->dev->fw_handler->type;
> int ret;
>
> instance = kzalloc_obj(*instance);
> @@ -1885,8 +1886,8 @@ static int vdec_av1_slice_init(struct mtk_vcodec_dec_ctx *ctx)
> return -ENOMEM;
>
> instance->ctx = ctx;
> - instance->vpu.id = SCP_IPI_VDEC_LAT;
> - instance->vpu.core_id = SCP_IPI_VDEC_CORE;
> + instance->vpu.id = mtk_vcodec_fw_get_ipi(fw_type, MTK_VDEC_LAT0);
> + instance->vpu.core_id = mtk_vcodec_fw_get_ipi(fw_type, MTK_VDEC_CORE);
[Severity: Low]
Should mtk_vcodec_fw_get_ipi() take struct mtk_vcodec_fw *fw instead of
enum mtk_vcodec_fw_type?
In mtk_vcodec_fw.h, struct mtk_vcodec_fw is forward-declared as an opaque
handle whose definition lives in mtk_vcodec_fw_priv.h, and every other
mtk_vcodec_fw_*() helper takes struct mtk_vcodec_fw *fw as its first
argument (with mtk_vcodec_fw_get_type() provided specifically to query
fw->type). Taking enum mtk_vcodec_fw_type here causes vdec_av1_slice_init()
and the other four decoder init callbacks to reach directly into the private
ctx->dev->fw_handler->type field.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117032950.1425556-1-kyrie.wu@mediatek.com?part=4
next prev parent reply other threads:[~2026-11-17 3:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 3:29 [PATCH v9 00/14] media: mediatek: vcodec: support video decoder in mt8196 Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 01/14] media: mediatek: vcodec: support vcp architecture Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 02/14] media: mediatek: vcodec: add driver to support vcp Kyrie Wu
2026-11-17 3:55 ` sashiko-bot
2026-11-17 3:29 ` [PATCH v9 03/14] media: mediatek: vcodec: add driver to support vcp encoder Kyrie Wu
2026-11-17 3:53 ` sashiko-bot
2026-11-17 3:29 ` [PATCH v9 04/14] media: mediatek: vcodec: get different firmware ipi id Kyrie Wu
2026-11-17 3:53 ` sashiko-bot [this message]
2026-11-17 3:29 ` [PATCH v9 05/14] media: mediatek: vcodec: get share memory address Kyrie Wu
2026-11-17 3:58 ` sashiko-bot
2026-11-17 3:29 ` [PATCH v9 06/14] media: mediatek: vcodec: add debug information Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 07/14] media: mediatek: vcodec: send share memory address to vcp Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 08/14] media: dt-bindings: mediatek,vcodec-subdev-decoder: Add MT8196 Kyrie Wu
2026-11-17 3:39 ` sashiko-bot
2026-11-17 3:29 ` [PATCH v9 09/14] media: mediatek: vcodec: add decoder compatible to support mt8196 Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 10/14] media: mediatek: vcodec: define MT8196 vcodec levels Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 11/14] media: mediatek: vcodec: support 36bit iova address Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 12/14] media: mediatek: vcodec: clean xpc status Kyrie Wu
2026-11-17 4:04 ` sashiko-bot
2026-11-17 3:29 ` [PATCH v9 13/14] media: mediatek: decoder: fill av1 buffer size with picinfo Kyrie Wu
2026-11-17 3:29 ` [PATCH v9 14/14] media: mediatek: decoder: support av1 extend vsi Kyrie Wu
2026-11-17 4:14 ` sashiko-bot
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-218167@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kyrie.wu@mediatek.com \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.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.