From nobody Sun Sep 22 13:23:54 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77EB3C433F5 for ; Tue, 28 Dec 2021 09:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233436AbhL1JmY (ORCPT ); Tue, 28 Dec 2021 04:42:24 -0500 Received: from mailgw01.mediatek.com ([60.244.123.138]:50648 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S236102AbhL1JmK (ORCPT ); Tue, 28 Dec 2021 04:42:10 -0500 X-UUID: f82fbee02c3e4d3c8afff772064357e4-20211228 X-UUID: f82fbee02c3e4d3c8afff772064357e4-20211228 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 925919062; Tue, 28 Dec 2021 17:42:08 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Dec 2021 17:42:06 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 28 Dec 2021 17:42:04 +0800 From: Yunfei Dong To: Yunfei Dong , Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa CC: Hsin-Yi Wang , Fritz Koenig , Dafna Hirschfeld , Benjamin Gaignard , Daniel Vetter , dri-devel , Irui Wang , AngeloGioacchino Del Regno , Steve Cho , , , , , , , Subject: [PATCH v2, 10/12] media: mtk-vcodec: Fix v4l2-compliance fail Date: Tue, 28 Dec 2021 17:41:44 +0800 Message-ID: <20211228094146.20505-11-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211228094146.20505-1-yunfei.dong@mediatek.com> References: <20211228094146.20505-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yunfei Dong Need to use default pic info when get pic info fail from scp side. Signed-off-by: Yunfei Dong --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/m= edia/platform/mtk-vcodec/mtk_vcodec_dec.c index 0317a9930de1..4533cb44551d 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -480,11 +480,14 @@ static int vidioc_vdec_s_fmt(struct file *file, void = *priv, ctx->picinfo.pic_w =3D pix_mp->width; ctx->picinfo.pic_h =3D pix_mp->height; =20 + /* + * If get pic info fail, need to use the default pic info params, or + * v4l2-compliance will fail + */ ret =3D vdec_if_get_param(ctx, GET_PARAM_PIC_INFO, &ctx->picinfo); if (ret) { mtk_v4l2_err("[%d]Error!! Get GET_PARAM_PICTURE_INFO Fail", ctx->id); - return -EINVAL; } =20 ctx->last_decoded_picinfo =3D ctx->picinfo; --=20 2.25.1