Re: [PATCH v6 01/14] media: mediatek: vcodec: support vcp architecture

From: Nicolas Dufresne

Date: Mon Jul 20 2026 - 09:06:58 EST


Hi,

Le lundi 20 juillet 2026 à 09:20 +0800, Kyrie Wu a écrit :
> Some platforms expose the video codec through the VCP coprocessor.
> Use the VCP architecture when the VCP coprocessor is found.
>
> Signed-off-by: Kyrie Wu <kyrie.wu@xxxxxxxxxxxx>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
> ---
>  drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h  | 1 +
>  .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c      | 3 +++
>  2 files changed, 4 insertions(+)
>
> 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 300363a40..c1642fb09 100644
> --- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h
> +++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw.h
> @@ -14,6 +14,7 @@ struct mtk_vcodec_enc_dev;
>  enum mtk_vcodec_fw_type {
>   VPU,
>   SCP,
> + VCP,
>  };
>  
>  enum mtk_vcodec_fw_use {
> diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c
> index e936ed8df..d220b645e 100644
> --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c
> +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c
> @@ -379,6 +379,9 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
>   } else if (!of_property_read_u32(pdev->dev.of_node, "mediatek,scp",
>   &rproc_phandle)) {
>   fw_type = SCP;
> + } else if (!of_property_read_u32(pdev->dev.of_node, "mediatek,vcp",
> + &rproc_phandle)) {
> + fw_type = VCP;

I know I gave an rb a while ago, but then we reviewed the 8189 code, and we
underlined that this makes little sense, and that fw_type should simply be set
in the pdata. Same applies to mtk_vcodec_dec_get_chip_name(), the chip "name",
or integer form of, is clearly a 1 to 1 match for pdata.

Nicolas

>   } else {
>   dev_dbg(&pdev->dev, "Could not get vdec IPI device");
>   return -ENODEV;

Attachment: signature.asc
Description: This is a digitally signed message part