lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49d55e669473bef7b08882916095f10f409c85a0.camel@collabora.com>
Date: Thu, 06 Nov 2025 09:21:58 -0500
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Kyrie Wu <kyrie.wu@...iatek.com>, Tiffany Lin
 <tiffany.lin@...iatek.com>,  Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
 Yunfei Dong <yunfei.dong@...iatek.com>, Mauro Carvalho Chehab	
 <mchehab@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski	
 <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Matthias Brugger	
 <matthias.bgg@...il.com>, AngeloGioacchino Del Regno	
 <angelogioacchino.delregno@...labora.com>, Hans Verkuil
 <hverkuil@...all.nl>,  Nathan Hebert <nhebert@...omium.org>, Arnd Bergmann
 <arnd@...db.de>, Irui Wang <irui.wang@...iatek.com>,  George Sun
 <george.sun@...iatek.com>, linux-media@...r.kernel.org,
 devicetree@...r.kernel.org, 	linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, 	linux-mediatek@...ts.infradead.org,
 Yilong Zhou <yilong.zhou@...iatek.com>
Cc: Neil Armstrong <neil.armstrong@...aro.org>, Andrzej Pietrasiewicz
	 <andrzejtp2010@...il.com>
Subject: Re: [PATCH v5 2/8] media: mediatek: vcodec: add decoder compatible
 to support MT8189

Hi,

Le jeudi 06 novembre 2025 à 14:13 +0800, Kyrie Wu a écrit :
> MT8189 is pure single core architecture. Support its compatible and
> use `mtk_vdec_single_core_pdata` to initialize platform data.
> 
> Signed-off-by: Kyrie Wu <kyrie.wu@...iatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
>  .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c   | 6 ++++++
>  .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h   | 1 +
>  2 files changed, 7 insertions(+)
> 
> 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 6fb05bb00641..fca60e81e3c7 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
> @@ -347,6 +347,8 @@ static void mtk_vcodec_dec_get_chip_name(struct mtk_vcodec_dec_dev *vdec_dev)
>  		vdec_dev->chip_name = MTK_VDEC_MT8188;
>  	else if (of_device_is_compatible(dev->of_node, "mediatek,mt8196-vcodec-dec"))
>  		vdec_dev->chip_name = MTK_VDEC_MT8196;
> +	else if (of_device_is_compatible(dev->of_node, "mediatek,mt8189-vcodec-dec"))
> +		vdec_dev->chip_name = MTK_VDEC_MT8189;
>  	else
>  		vdec_dev->chip_name = MTK_VDEC_INVAL;
>  }
> @@ -574,6 +576,10 @@ static const struct of_device_id mtk_vcodec_match[] = {
>  		.compatible = "mediatek,mt8196-vcodec-dec",
>  		.data = &mtk_lat_sig_core_pdata,
>  	},
> +	{
> +		.compatible = "mediatek,mt8189-vcodec-dec",
> +		.data = &mtk_vdec_single_core_pdata,
> +	},

Maybe its just me, but its annoying that you match the compatible twice. It is
of course more work to add yet another indirection for the chip_name, but
considering you do 2 soc / year (and sometimes more) this will keep growing.

Opinions ? I'd don't want to block this forever, but I'd like to see some
cleanup of this driver happening in the long term.

Nicolas

>  	{},
>  };
>  
> diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
> index 429b32952194..9421fd4fda1d 100644
> --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
> +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
> @@ -25,6 +25,7 @@ enum mtk_vcodec_dec_chip_name {
>  	MTK_VDEC_MT8183 = 8183,
>  	MTK_VDEC_MT8186 = 8186,
>  	MTK_VDEC_MT8188 = 8188,
> +	MTK_VDEC_MT8189 = 8189,
>  	MTK_VDEC_MT8192 = 8192,
>  	MTK_VDEC_MT8195 = 8195,
>  	MTK_VDEC_MT8196 = 8196,

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ