Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp159843rda; Sat, 21 Oct 2023 02:45:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFL4ZJKdESV/EEqWjxRMdhXW5ojqzRXsJoNyGn4OSSyBY2OoY0njF1CCF5AHn5SCywu4nO7 X-Received: by 2002:a05:6a00:2382:b0:6b1:cc77:4d2 with SMTP id f2-20020a056a00238200b006b1cc7704d2mr5229423pfc.15.1697881502127; Sat, 21 Oct 2023 02:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697881502; cv=none; d=google.com; s=arc-20160816; b=P83TZPeUNBeRAg8QdQrs2EIM8dB2iL0ihD4gK3hFBu1RgS/7OrWx13sl1yh8weO0oq JV5WUH1lYFLGlOJ8xp86t+HHnhbMI+9OfEdD8j7H66zMGIdumF40BHW/T5k0DMYiX34w 5XLTcfwEDeKiaA5DvSNm8TpZp1Bev6/ugWaPjvsSZHcOt4s531LVKqwQOfQOLMWachuQ C4bbqlVpwUobhvC0pzpFSm9eFwYJu4EdY88PYfKcCMySOWe1eYpt+WgHqFk54kR8HEQb umTQspm5181nOm8xFhQbZ0nCHI4sl5MPWDhWP2CEY8aazI1gfThLKvjSb/FjA/Ltu3F9 rY+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CYhVjSxmiNe8wo6V7ME+0J7gbYM6iLcm6/KgSZfse3Y=; fh=hadP/Qit0fP83aE7jDic8vfKKSMzMzFbjuOmlm+1S4s=; b=nnPl6656U+1xMx/QcniGbbyfjR9Q9ZpI3+rtWIBHB5HCf7yj21PycqCbukVXh34DdP /8wcaCRAAJaZH8oWqP2nyQ4SZmtAsRwhM7R3+zbIVwVMN3D/OfbBF+8XubhsK5QOw8A0 drDua79yefoOAO4m9t/cP+eKPEfFQ5zGg05JHfl4yKJf/0pnS6tTbg55eRXsFGWBAGaT ktab9+XPxWEijRPMmYdA+53CcrCuXTO+vqk4nmlp2wheGXzgwf4XwyvVTbRh3rC5OatT yBfSa8vtORlQuTyG53QkOBcZ+qcu4Aw8IowoRIJBc8LBStdGMzVkTyx59GMcqy7wnA91 V1TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZK1TGZJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k80-20020a628453000000b006933e8fec5asi3397097pfd.383.2023.10.21.02.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 02:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZK1TGZJi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F2FEC82159F4; Sat, 21 Oct 2023 02:45:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231179AbjJUJo4 (ORCPT + 99 others); Sat, 21 Oct 2023 05:44:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjJUJow (ORCPT ); Sat, 21 Oct 2023 05:44:52 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF208D52; Sat, 21 Oct 2023 02:44:47 -0700 (PDT) Received: from localhost (89-26-75-29.dyn.cablelink.at [89.26.75.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sebastianfricke) by madras.collabora.co.uk (Postfix) with ESMTPSA id A04C26607337; Sat, 21 Oct 2023 10:44:46 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697881486; bh=ti3+0qlDl3N/PPkGisFxcRpahI6GOcbLzoK1uCIWoV4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZK1TGZJisg5QZItFBbAWoksBY5RewuX/mMgau6VTTafRJrrMXlaTyzEsSThJ2fROK lV13bsN08tvJZqUHfdC1ubITVFAGtczBVueiRhmuazOJSLfEaLWy1e6/3TM8PRg5pe eckvX97m7qosxt7VVxGWVYrhAco/MkvPzwGXC4d7bGz6bZjq0W3GUyFyOeTsN0s7IE 0Ms+ZmcaTIE+HdkgMcsUkTqm4wIjkD+a0JfA5QgQFOqov2rSRrWmcMfLm2X9WeIx40 atyOpmBmuL5V2SUd3nyscRneuYB6wTpxnLQG2aq35nAWumS5eyMT4YCgwPr/KF14zA wwVQkf3WdmyMw== Date: Sat, 21 Oct 2023 11:44:44 +0200 From: Sebastian Fricke To: Yunfei Dong Cc: =?utf-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4=?= Prado , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Nathan Hebert , Chen-Yu Tsai , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH 7/7] media: mediatek: vcodec: Setting the supported vp9 profile for each platform Message-ID: <20231021094444.l4it4bh4y56a2qtt@basti-XPS-13-9310> References: <20231016064346.31451-1-yunfei.dong@mediatek.com> <20231016064346.31451-7-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <20231016064346.31451-7-yunfei.dong@mediatek.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 21 Oct 2023 02:45:01 -0700 (PDT) Hey Yunfei, Please replace Setting with Set in the title. On 16.10.2023 14:43, Yunfei Dong wrote: >The supported format type of different platforms are not the >same. Need to set the supported profile according to the chip name. I would suggest the following rewording: Set the maximum VP9 codec profile for each platform. The various mediatek platforms support different profiles for decoding, the profile of the codec limits the capabilities for decoding. With that you can add: Reviewed-by: Sebastian Fricke Regards, Sebastian > >Signed-off-by: Yunfei Dong >--- > .../vcodec/decoder/mtk_vcodec_dec_stateless.c | 22 ++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c >index 02985184fa0f..ae181498c3c3 100644 >--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c >+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c >@@ -109,7 +109,8 @@ static const struct mtk_stateless_control mtk_stateless_controls[] = { > .id = V4L2_CID_MPEG_VIDEO_VP9_PROFILE, > .min = V4L2_MPEG_VIDEO_VP9_PROFILE_0, > .def = V4L2_MPEG_VIDEO_VP9_PROFILE_0, >- .max = V4L2_MPEG_VIDEO_VP9_PROFILE_3, >+ .max = V4L2_MPEG_VIDEO_VP9_PROFILE_2, >+ .menu_skip_mask = BIT(V4L2_MPEG_VIDEO_VP9_PROFILE_1), > }, > .codec_type = V4L2_PIX_FMT_VP9_FRAME, > }, >@@ -630,6 +631,20 @@ static void mtk_vcodec_dec_fill_vp9_level(struct v4l2_ctrl_config *cfg, > }; > } > >+static void mtk_vcodec_dec_fill_vp9_profile(struct v4l2_ctrl_config *cfg, >+ struct mtk_vcodec_dec_ctx *ctx) >+{ >+ switch (ctx->dev->chip_name) { >+ case MTK_VDEC_MT8188: >+ case MTK_VDEC_MT8195: >+ cfg->max = V4L2_MPEG_VIDEO_VP9_PROFILE_2; >+ break; >+ default: >+ cfg->max = V4L2_MPEG_VIDEO_VP9_PROFILE_1; >+ break; >+ }; >+} >+ > static void mtk_vcodec_dec_reset_controls(struct v4l2_ctrl_config *cfg, > struct mtk_vcodec_dec_ctx *ctx) > { >@@ -656,6 +671,11 @@ static void mtk_vcodec_dec_reset_controls(struct v4l2_ctrl_config *cfg, > mtk_v4l2_vdec_dbg(3, ctx, "h265 supported profile: %lld %lld", cfg->max, > cfg->menu_skip_mask); > break; >+ case V4L2_CID_MPEG_VIDEO_VP9_PROFILE: >+ mtk_vcodec_dec_fill_vp9_profile(cfg, ctx); >+ mtk_v4l2_vdec_dbg(3, ctx, "vp9 supported profile: %lld %lld", cfg->max, >+ cfg->menu_skip_mask); >+ break; > default: > break; > }; >-- >2.18.0 >