* [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats
@ 2023-04-22 10:39 Pin-yen Lin
2023-04-25 6:38 ` Chen-Yu Tsai
2023-04-25 11:29 ` Yunfei Dong (董云飞)
0 siblings, 2 replies; 3+ messages in thread
From: Pin-yen Lin @ 2023-04-22 10:39 UTC (permalink / raw)
To: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, moderated list:ARM/Mediatek SoC support,
open list:ARM/Mediatek SoC support,
open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
moderated list:ARM/Mediatek SoC support, Pin-yen Lin,
Hans Verkuil
When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip
formats that are not MTK_FMT_DEC so only decoder formats is updated in
mtk_init_vdec_params.
Fixes: e25528e1dbe5 ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder")
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
---
.../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c | 3 +++
1 file changed, 3 insertions(+)
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 29991551cf61..0fbd030026c7 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
@@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx)
if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
for (i = 0; i < num_supported_formats; i++) {
+ if (mtk_video_formats[i].type != MTK_FMT_DEC)
+ continue;
+
mtk_video_formats[i].frmsize.max_width =
VCODEC_DEC_4K_CODED_WIDTH;
mtk_video_formats[i].frmsize.max_height =
--
2.40.0.634.g4ca3ef3211-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats
2023-04-22 10:39 [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats Pin-yen Lin
@ 2023-04-25 6:38 ` Chen-Yu Tsai
2023-04-25 11:29 ` Yunfei Dong (董云飞)
1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2023-04-25 6:38 UTC (permalink / raw)
To: Pin-yen Lin
Cc: Tiffany Lin, Andrew-CT Chen, Yunfei Dong, Mauro Carvalho Chehab,
Matthias Brugger, AngeloGioacchino Del Regno,
moderated list:ARM/Mediatek SoC support,
open list:ARM/Mediatek SoC support,
open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
moderated list:ARM/Mediatek SoC support, Hans Verkuil
On Sat, Apr 22, 2023 at 6:39 PM Pin-yen Lin <treapking@chromium.org> wrote:
>
> When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip
> formats that are not MTK_FMT_DEC so only decoder formats is updated in
> mtk_init_vdec_params.
>
> Fixes: e25528e1dbe5 ("media: mediatek: vcodec: Use 4K frame size when supported by stateful decoder")
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
>
> .../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> 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 29991551cf61..0fbd030026c7 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> @@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct mtk_vcodec_ctx *ctx)
>
> if (!(ctx->dev->dec_capability & VCODEC_CAPABILITY_4K_DISABLED)) {
> for (i = 0; i < num_supported_formats; i++) {
> + if (mtk_video_formats[i].type != MTK_FMT_DEC)
> + continue;
> +
> mtk_video_formats[i].frmsize.max_width =
> VCODEC_DEC_4K_CODED_WIDTH;
> mtk_video_formats[i].frmsize.max_height =
> --
> 2.40.0.634.g4ca3ef3211-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats
2023-04-22 10:39 [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats Pin-yen Lin
2023-04-25 6:38 ` Chen-Yu Tsai
@ 2023-04-25 11:29 ` Yunfei Dong (董云飞)
1 sibling, 0 replies; 3+ messages in thread
From: Yunfei Dong (董云飞) @ 2023-04-25 11:29 UTC (permalink / raw)
To: treapking
Cc: linux-mediatek, linux-kernel,
Tiffany Lin (林慧珊),
wenst, linux-media, mchehab, hverkuil-cisco, linux-arm-kernel,
matthias.bgg, Andrew-CT Chen (陳智迪),
angelogioacchino.delregno
On Sat, 2023-04-22 at 18:39 +0800, Pin-yen Lin wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> When VCODEC_CAPABILITY_4K_DISABLED is not set in dec_capability, skip
> formats that are not MTK_FMT_DEC so only decoder formats is updated
> in
> mtk_init_vdec_params.
>
> Fixes: e25528e1dbe5 ("media: mediatek: vcodec: Use 4K frame size when
> supported by stateful decoder")
> Signed-off-by: Pin-yen Lin <treapking@chromium.org>
> ---
>
Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.com>
> .../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c | 3
> +++
> 1 file changed, 3 insertions(+)
>
> 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 29991551cf61..0fbd030026c7 100644
> ---
> a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> +++
> b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateful.c
> @@ -584,6 +584,9 @@ static void mtk_init_vdec_params(struct
> mtk_vcodec_ctx *ctx)
>
> if (!(ctx->dev->dec_capability &
> VCODEC_CAPABILITY_4K_DISABLED)) {
> for (i = 0; i < num_supported_formats; i++) {
> + if (mtk_video_formats[i].type != MTK_FMT_DEC)
> + continue;
> +
> mtk_video_formats[i].frmsize.max_width =
> VCODEC_DEC_4K_CODED_WIDTH;
> mtk_video_formats[i].frmsize.max_height =
> --
> 2.40.0.634.g4ca3ef3211-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-25 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-22 10:39 [PATCH] media: mediatek: vcodec: Only apply 4K frame sizes on decoder formats Pin-yen Lin
2023-04-25 6:38 ` Chen-Yu Tsai
2023-04-25 11:29 ` Yunfei Dong (董云飞)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®