mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
media: mediatek: vcodec: Make MM21 the default capture format
[ Upstream commit6d020d81b9] Given that only the MM21 capture format is supported by userspace tools (like gstreamer and libyuv), make it the default capture format. This allows us to force the MM21 format even when a MM21 and MT21C capable firmware is available (which is needed while dynamic format switching isn't implemented in the driver), without causing the following regressions on v4l2-compliance: fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_G_FMT: FAIL fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_TRY_FMT: FAIL fail: v4l2-test-formats.cpp(478): pixelformat 3132544d (MT21) for buftype 9 not reported by ENUM_FMT test VIDIOC_S_FMT: FAIL Fixes:7501edef6b("media: mediatek: vcodec: Different codec using different capture format") Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reviewed-by: Nicolas F. R. A. Prado <nfraprado@collabora.com> Tested-by: Nicolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5c4cc91b77
commit
4d5c8a8916
@@ -390,14 +390,14 @@ static void mtk_vcodec_get_supported_formats(struct mtk_vcodec_ctx *ctx)
|
|||||||
if (num_formats)
|
if (num_formats)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_MM21) {
|
|
||||||
mtk_vcodec_add_formats(V4L2_PIX_FMT_MM21, ctx);
|
|
||||||
cap_format_count++;
|
|
||||||
}
|
|
||||||
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_MT21C) {
|
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_MT21C) {
|
||||||
mtk_vcodec_add_formats(V4L2_PIX_FMT_MT21C, ctx);
|
mtk_vcodec_add_formats(V4L2_PIX_FMT_MT21C, ctx);
|
||||||
cap_format_count++;
|
cap_format_count++;
|
||||||
}
|
}
|
||||||
|
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_MM21) {
|
||||||
|
mtk_vcodec_add_formats(V4L2_PIX_FMT_MM21, ctx);
|
||||||
|
cap_format_count++;
|
||||||
|
}
|
||||||
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_H264_SLICE) {
|
if (ctx->dev->dec_capability & MTK_VDEC_FORMAT_H264_SLICE) {
|
||||||
mtk_vcodec_add_formats(V4L2_PIX_FMT_H264_SLICE, ctx);
|
mtk_vcodec_add_formats(V4L2_PIX_FMT_H264_SLICE, ctx);
|
||||||
out_format_count++;
|
out_format_count++;
|
||||||
|
|||||||
Reference in New Issue
Block a user