From patchwork Wed Oct 19 08:29:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp226229wrs; Wed, 19 Oct 2022 02:45:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5PYPq97DlvMYKHwt+jwMthMApe8hNGevjDhYnzuQ4NoHjCMd8ZefsJrjSFCMX1dZI7XOQb X-Received: by 2002:a62:1bd1:0:b0:562:a99e:93cd with SMTP id b200-20020a621bd1000000b00562a99e93cdmr7731361pfb.21.1666172719863; Wed, 19 Oct 2022 02:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172719; cv=none; d=google.com; s=arc-20160816; b=XWyftuj+UQy8BidM6MXjIZ3KgalPauOMorerDfSNA0GXQ0KiEojd+1sSSzKH4ZoTXy TV44osamOyTSpr3Mu3Zd5ZcM7k474gvGevgEoYA+6I9Fnxx8pXDWwTkvX8xcRzusq3B/ LWKW6Pa5QEmyd6+/3ApbwSawkQRGcPwNbILJyTIirppNzBUw4rI2nMjzBWxbzbtg5Fqg q/Htnjsu/1dmP7O24k1Ey5pRM59T0dBiYuJ01yCXNHVpK2nV4FHFe3vIDDQwUrm/iDjQ KMep0eMAJZNtHKEhuH3ZKe4t5+nKtvDsdV2Q13WRR/JpKarrqwLiVcu6Snmq0TQjxi9V tuPg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a63d708000000b0044a82d20079si18443253pgg.526.2022.10.19.02.45.05; Wed, 19 Oct 2022 02:45:19 -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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747108725800679272?= X-GMAIL-MSGID: =?utf-8?q?1747108725800679272?= 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) {