linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] media: mediatek: vcodec: Force capture queue format to MM21
@ 2023-02-10  5:55 Yunfei Dong
  2023-02-10 15:36 ` Nicolas Dufresne
  0 siblings, 1 reply; 8+ messages in thread
From: Yunfei Dong @ 2023-02-10  5:55 UTC (permalink / raw)
  To: Yunfei Dong, Chen-Yu Tsai, Nicolas Dufresne, Hans Verkuil,
	AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin
  Cc: Mauro Carvalho Chehab, Matthias Brugger, Hsin-Yi Wang,
	Fritz Koenig, Daniel Vetter, Steve Cho, linux-media, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek,
	Project_Global_Chrome_Upstream_Group

In order to conver the format of capture queue from mediatek MM21 to
standard yuv420 with Libyuv, need to force capture queue format to
MM21 for Libyuv can't covert mediatek MT21 format at current period.

Fixes: 7501edef6b1f ("media: mediatek: vcodec: Different codec using different capture format")
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.org>
---
changed with v1:
- add Fixes tag.
---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
index 641f533c417f..4f5e9c20214f 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
@@ -41,7 +41,7 @@ static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_ctx *ctx, int format_index)
 	const struct mtk_video_fmt *fmt;
 	struct mtk_q_data *q_data;
 	int num_frame_count = 0, i;
-	bool ret = true;
+	bool ret = false;
 
 	for (i = 0; i < *dec_pdata->num_formats; i++) {
 		if (dec_pdata->vdec_formats[i].type != MTK_FMT_FRAME)
@@ -63,7 +63,7 @@ static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_ctx *ctx, int format_index)
 	case V4L2_PIX_FMT_H264_SLICE:
 	case V4L2_PIX_FMT_VP9_FRAME:
 		if (fmt->fourcc == V4L2_PIX_FMT_MM21)
-			ret = false;
+			ret = true;
 		break;
 	default:
 		ret = true;
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-14  2:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10  5:55 [PATCH v2] media: mediatek: vcodec: Force capture queue format to MM21 Yunfei Dong
2023-02-10 15:36 ` Nicolas Dufresne
2023-02-14  2:28   ` Yunfei Dong (董云飞)
2023-02-22 21:11     ` Nícolas F. R. A. Prado
2023-02-27  2:17       ` Yunfei Dong (董云飞)
2023-02-28 22:03         ` Nícolas F. R. A. Prado
2023-02-14  2:29   ` Yunfei Dong (董云飞)
2023-03-14  2:04   ` Yunfei Dong (董云飞)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).