Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2100187pxb; Sat, 22 Jan 2022 16:16:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0hfdMjOi7mnb5syvcG3waM1RKbUGyI0PzOYCgP6OFXTmBNxm11blejMP+ekes9Ls/0geC X-Received: by 2002:a17:903:1209:b0:149:a428:19ef with SMTP id l9-20020a170903120900b00149a42819efmr9269877plh.47.1642896960610; Sat, 22 Jan 2022 16:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642896960; cv=none; d=google.com; s=arc-20160816; b=hkGhGPnC0kjNEQNPcMAL8cNK260GbgD81OADxJIOa2L0IWa4PWfuHhfXd/2/6RCkua OJdU1mA9imuOJ3r72j1bCidPuLCmzngM7HXIA5X3U+6za2tSvedO6ece24Hpy3npIFhF HWBMhe0WD127qhjKNpo9gJfuAMZQKzzDUJKFPBps33X9/XUfQsF33qf5N7aZI66f8FdQ Okeno0h5qivxlTjdhQ3xRTJRZ317DY5UMU3UARs6W4978sHBLVORuQtLINdnQ/zQQMvR 8O6gy39nElslkH6LvDFvgoAD/ejPm/hUamRwmtbpObqwpg0HEiybBSRoLA4WR6PYaloK KrCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KDE6MDOtpOwpThOFphHxhM5FZ4IjU4txKfu5GFr3/GQ=; b=yinl8OyB5kAqJIxKSNwsjEam7DgTp+zeWAMhx7UcadvF1zhrPOsi8nMe/PkFVrIfPz fEN3RkefL54NKl14Quc6QrefmChm+7zw3rpZypRJTUI5r5q9sNq0MKhSbEVYR0VGujYm el47KhsY3sm30BP+8a+YMDa9kQc0D/gbNzG/WRXji3Ua5JwooZd3LADAWS71pAFKWaYI iqLL30YdJmU+qnkxoGxCwQwz+t4MRPQiKGT52R1q7eO/T9Lg2oa/XYoQ60OHkPCkyMiS pE2BFkfOg2GYHfp2I1CckmygHYGtjrP5jB0ObLbGgDpdkOjjxvMIrPjfvkwVDNPhyp2l YPXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f10si5557145pfe.381.2022.01.22.16.15.25; Sat, 22 Jan 2022 16:16:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232909AbiAVDxx (ORCPT + 99 others); Fri, 21 Jan 2022 22:53:53 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:52122 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232552AbiAVDxj (ORCPT ); Fri, 21 Jan 2022 22:53:39 -0500 X-UUID: bfc7b89188bb4308831c71f45669fb95-20220122 X-UUID: bfc7b89188bb4308831c71f45669fb95-20220122 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 594898675; Sat, 22 Jan 2022 11:53:36 +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; Sat, 22 Jan 2022 11:53:34 +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; Sat, 22 Jan 2022 11:53:33 +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: George Sun , Xiaoyong Lu , Hsin-Yi Wang , Fritz Koenig , Dafna Hirschfeld , Benjamin Gaignard , Daniel Vetter , dri-devel , Irui Wang , AngeloGioacchino Del Regno , Steve Cho , , , , , , , Subject: [PATCH v6, 10/15] media: mtk-vcodec: Fix v4l2-compliance fail Date: Sat, 22 Jan 2022 11:53:11 +0800 Message-ID: <20220122035316.18179-11-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220122035316.18179-1-yunfei.dong@mediatek.com> References: <20220122035316.18179-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Need to use default pic info when get pic info fail. 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/media/platform/mtk-vcodec/mtk_vcodec_dec.c index ba188d16f0fb..5a429ed83ed4 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -478,11 +478,14 @@ static int vidioc_vdec_s_fmt(struct file *file, void *priv, ctx->picinfo.pic_w = pix_mp->width; ctx->picinfo.pic_h = pix_mp->height; + /* + * If get pic info fail, need to use the default pic info params, or + * v4l2-compliance will fail + */ ret = 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; } ctx->last_decoded_picinfo = ctx->picinfo; -- 2.25.1