Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp798521rwi; Wed, 19 Oct 2022 03:09:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6R/r2SwvYeGX6BTfWU3kmHffBcNwwgjWiFHJ/zllRCbkF36ZT6rLrkQWwQGmd1C1PN+MMY X-Received: by 2002:a63:fb09:0:b0:43c:b1c6:b335 with SMTP id o9-20020a63fb09000000b0043cb1c6b335mr6682919pgh.276.1666174153621; Wed, 19 Oct 2022 03:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666174153; cv=none; d=google.com; s=arc-20160816; b=MHOC8EWF34aYpDyzsCBvNW4wP/SN7Q3c19Jj4+Hfu2HdQMpPv64SRpKE2ZN0qA1+7m yOiPA6gN6ONsYUuBKBNIYv4SLzPRuO9UnCVqCT2y7FYCUHh7V1Pztag+GsfBLehX7aaX wWk/kIbtu34+oeohq/EbMOHTC5Y9a/09yrxnPYLT472z5PgDuBej+qEC5Qh0ad+nJZWy wQutXDLYiHQXdrIwQlOI0Qi4sC3STEJ6NQN+KulULYgwwedl9o308S3BUa5w13j2Ow/J ZQv3M+di0lCPsx7+9xV5b/eU2eJK/AsQG/LjPBc9Y3bK+kq6ATj1bi+leDDrRJV4CybI LZNw== 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=mjgFDvA7C+2/ZsC94puDKP9Y7VfuPVuDMyssrpge7Z4=; b=A91Auqio+w1UxhKVixdhXN2UqR9J+a9NhVPcMVYzGnN1PK9ZfaZksD5tn8L3O9hht5 36pCTmWyQwV25dhmMlL6y4z/e4whQYcjLTFEvTjuxH+bUhQPGR4MNU8CNbgXzSQdkfw0 xDscKF83rkqoOFHsHyDrMOYQOxDefVbJgMjpjURk9FrOqcgIHAyY5Q9vth1/ti5z3RXu mELkjuZYJJh0Xmjx84Y9Rxm697cPZ1KmHvhCb6JE+gfv9HZNcSg+S+3v1CktOS9nE3Q8 JDyPNjk8ZfZPQAu06qLlFfSXPjIMzHgWukjfU1h8i2GwN2PTLCyzhAhdQlgp3P9M/PMm eLiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D5n3cPBG; 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 s3-20020a170902c64300b001865a9586c1si293460pls.59.2022.10.19.03.08.59; Wed, 19 Oct 2022 03:09:13 -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=D5n3cPBG; 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 S233880AbiJSJgH (ORCPT + 99 others); Wed, 19 Oct 2022 05:36:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233904AbiJSJ3t (ORCPT ); Wed, 19 Oct 2022 05:29:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2873C4DB9; Wed, 19 Oct 2022 02:13:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 10E5061753; Wed, 19 Oct 2022 09:01:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14A30C433C1; Wed, 19 Oct 2022 09:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170096; bh=JsDx77DlKx59+hH1YurFER2oKGhdjNdket3/uH/5OJU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5n3cPBGYmPgYdg5YUBnpKGCuMW0D604mkOTev61dKuOPx3X2JmFFeCssoTtE4jM0 FGBm6aOnS3VSHqHYbqn9Kv4Qj5Weq2sPSeVZytP4rhalG71IePTItnCZptrf55mZXR B/QrY1cBl3u4+ncyFjzqc3oUKe4CcfNzNbvQORe8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hirokazu Honda , Chen-Yu Tsai , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.0 489/862] media: mediatek: vcodec: Skip non CBR bitrate mode Date: Wed, 19 Oct 2022 10:29:36 +0200 Message-Id: <20221019083311.591055410@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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: Hirokazu Honda [ Upstream commit e7bfdf0a854037e8c0597f1f44f72651869c424d ] V4L2_MPEG_VIDEO_BITRATE_MODE_CBR is the only bitrate mode supported by the mediatek driver. The other bitrates must be skipped in QUERY_MENU. Fixes: d8e8aa866ed8 ("media: mediatek: vcodec: Report supported bitrate modes") Signed-off-by: Hirokazu Honda Reviewed-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c index 25e816863597..27c5fdaabed4 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c @@ -1403,7 +1403,8 @@ int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx) V4L2_MPEG_VIDEO_VP8_PROFILE_0, 0, V4L2_MPEG_VIDEO_VP8_PROFILE_0); v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_BITRATE_MODE, V4L2_MPEG_VIDEO_BITRATE_MODE_CBR, - 0, V4L2_MPEG_VIDEO_BITRATE_MODE_CBR); + ~(1 << V4L2_MPEG_VIDEO_BITRATE_MODE_CBR), + V4L2_MPEG_VIDEO_BITRATE_MODE_CBR); if (handler->error) { -- 2.35.1