Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4042317rwi; Sat, 22 Oct 2022 04:20:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NmJvj63ZS/5DD/cI16gYh33wCcqa00F1hqWxWUaPhkWAkDY+02QhtibeEQZTei5F7wN6E X-Received: by 2002:a05:6a00:1414:b0:563:ae66:3103 with SMTP id l20-20020a056a00141400b00563ae663103mr23524506pfu.17.1666437610693; Sat, 22 Oct 2022 04:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666437610; cv=none; d=google.com; s=arc-20160816; b=Xy3XSk2ovRD4Sgzu04mdrHJ9oBCRxxH1j0I2zx9URvr2agpz1cMrHM4EwlePwX6qG4 OJc76zxbgorllNvN+w7sYIbrafQgi0KB1uIJunQGSiuJvD76yHBcptTLsb51HG6fB8Fb FdRVUUnLi3PHmqrD4R4FuoXfguW3+DYA+fJJBjqopm2TJAN4aVvMfJcnATcXOAsraPmL xEMFMrL5J/GEe9FpPd9/DFVPsunpO4AeBQ7WwLYadEZZx5pSIuI63uGojbzb7bgdN6Hd ddPVHh0uKE/QpJnLt9MNE5hpFn1dwNofISts253E9dd4b9TYB3A3juHN6/5fwj62kIpD aGMQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hrsQIDMejoYUUZQTJ29BcdTSyH1+pok7Kf5yJ81Sqi0=; b=O0t1RYscBj0enJaIaPx0p46XvkpWWesFOnPOgrYFBPO0fa6QpK4+boUD51Ia6Uz/L0 Lsu2vKpqh4GsCtHG5UZtM2KXvLYf62ib8UjC4N5EiptxfbMLAwodW18JhsCFRjl460id g5zC7d766m3DT7CyWqNNUHRpL6v0wlRYhARozyrRS+WMP41BA0l32rgfcBZ7kA3ra/LX C8QAgTvtS4w8shxwaiMyC/ELQL+NifU3LtZ/nV8NK3S2RykVkxGXeVOlFBHeP2H8i1PY EqSMrm1Rlw7bFYEYAIl8dUusahQCX3WYwbDC0QhLi2pKHKpCrKdIFzdRWuUqg46+cK54 cWrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hswTckQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi12-20020a17090b4b4c00b0020befc1a93asi10900901pjb.100.2022.10.22.04.19.58; Sat, 22 Oct 2022 04:20:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hswTckQR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230490AbiJVLDc (ORCPT + 99 others); Sat, 22 Oct 2022 07:03:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbiJVLCl (ORCPT ); Sat, 22 Oct 2022 07:02:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40DC2FACE2; Sat, 22 Oct 2022 03:21:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 093F3B82DF7; Sat, 22 Oct 2022 07:53:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57DEEC433C1; Sat, 22 Oct 2022 07:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425207; bh=KnC0eVRrajGhZ5HIxfCVZGcjDmnvlTYo6SUexl+tkS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hswTckQR3a/keiU8FJ3bgflkKuv1NbMzn8ggvRJVETZbZjnlSNe4DvDxqeSNmawNR DTFpULLH+d5hugidJX5D7LVB1jGO6DhraZ2+IUkESqMk4FhCRTyAn7i2NNwnL1cvMR snYMc5X18MQZWZQB/MNP7r2Uovd293PHOtMw4Fko= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ming Qian , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.19 397/717] media: amphion: adjust the encoders value range of gop size Date: Sat, 22 Oct 2022 09:24:36 +0200 Message-Id: <20221022072515.402386581@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ming Qian [ Upstream commit 996f4e89fabe44ab9ac0aabb0697aeecbe717eca ] adjust the value range of gop size from [0, 65535] to [1, 8000]. when the gop size is set to a too large value, it may affect the encoded picture quality. so constrain it to a reasonable range. Fixes: 0401e659c1f92 ("media: amphion: add v4l2 m2m vpu encoder stateful driver") Signed-off-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/amphion/venc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/amphion/venc.c b/drivers/media/platform/amphion/venc.c index 43d61d82f58c..0f21a181c1de 100644 --- a/drivers/media/platform/amphion/venc.c +++ b/drivers/media/platform/amphion/venc.c @@ -644,7 +644,7 @@ static int venc_ctrl_init(struct vpu_inst *inst) BITRATE_DEFAULT_PEAK); v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops, - V4L2_CID_MPEG_VIDEO_GOP_SIZE, 0, (1 << 16) - 1, 1, 30); + V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 8000, 1, 30); v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops, V4L2_CID_MPEG_VIDEO_B_FRAMES, 0, 4, 1, 0); -- 2.35.1