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] [day] [month] [year] [list]
Message-ID: <b3a32197-c15d-bfdb-051d-724c63ad8cf0@xs4all.nl>
Date:   Mon, 13 Mar 2023 14:12:22 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     Pin-yen Lin <treapking@...omium.org>,
        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>,
        Matthias Brugger <matthias.bgg@...il.com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Tzung-Bi Shih <tzungbi@...nel.org>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Chen-Yu Tsai <wenst@...omium.org>, linux-media@...r.kernel.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH] media: mediatek: vcodec: Use 4K frame size when supported
 by stateful decoder

On 02/03/2023 14:18, Pin-yen Lin wrote:
> After commit b018be06f3c7 ("media: mediatek: vcodec: Read max resolution
> from dec_capability"), the stateful video decoder driver never really
> sets its output frame size to 4K.
> 
> Parse the decoder capability reported by the firmware, and update the
> output frame size in mtk_init_vdec_params to enable 4K frame size when
> available.
> 
> Fixes: b018be06f3c7 ("media: mediatek: vcodec: Read max resolution from dec_capability")
> Signed-off-by: Pin-yen Lin <treapking@...omium.org>
> ---
> 
>  .../mediatek/vcodec/mtk_vcodec_dec_stateful.c        | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> index 035c86e7809f..679f4dc9acfb 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> @@ -11,7 +11,7 @@
>  #include "mtk_vcodec_dec_pm.h"
>  #include "vdec_drv_if.h"
>  
> -static const struct mtk_video_fmt mtk_video_formats[] = {
> +static struct mtk_video_fmt mtk_video_formats[] = {
>  	{
>  		.fourcc = V4L2_PIX_FMT_H264,
>  		.type = MTK_FMT_DEC,
> @@ -580,6 +580,16 @@ static int mtk_vcodec_dec_ctrls_setup(struct mtk_vcodec_ctx *ctx)
>  
>  static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx)
>  {
> +	unsigned int i;
> +
> +	if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
> +		for (i = 0; i < num_supported_formats; i++) {
> +			mtk_vdec_framesizes[i].stepwise.max_width =
> +				VCODEC_DEC_4K_CODED_WIDTH;
> +			mtk_vdec_framesizes[i].stepwise.max_height =
> +				VCODEC_DEC_4K_CODED_HEIGHT;
> +		}
> +	}

This doesn't apply: commit cfce5b186537 ("media: mediatek: vcodec: decoder: Embed
framesize inside mtk_video_fmt") removed mtk_vdec_framesizes.

Please post a v2 if this is still relevant.

Regards,

	Hans

>  }
>  
>  static struct vb2_ops mtk_vdec_frame_vb2_ops = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ