Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1066035rwb; Fri, 13 Jan 2023 07:32:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtWbgtd4yyPYMMDOOo8v34PkiZgWmmYAG65aRIGG6oxS3v/goDS/Rk7G2iZYT1aLxQYHorl X-Received: by 2002:a17:907:1387:b0:7c8:9f04:ae7e with SMTP id vs7-20020a170907138700b007c89f04ae7emr2850651ejb.22.1673623959699; Fri, 13 Jan 2023 07:32:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673623959; cv=none; d=google.com; s=arc-20160816; b=Y0vmKMY7f838CxdnTGJJ9JcEHSIquRCxEQtyMntKqkScZH1ZqMZUsq52Xs5DSydnca lK3fyQxbBUPpWKkD4Nx7NDIiShZyvgV94b7mWITuLCOnQ6B74QEJrX/s6Or4//KO05SZ oph9w+MuD/Mi46un4JRkkp3frLpjPrYG9wM6fTUOrzoLVa+xEMrpI9daYFvXc9Qrxcq/ WR6aNwZhFsO5om/ZiaRtkQA9cxJ/oL8cUAcGpMwCw8m40gQEP3vXPqVkwWUmOmkk49o0 hAOEJZqijr3jT/6Z89IsSux02rS0nBBOqXm+E5+jIXbyBtA8SjCU6aYc57kSN4nB9u+z OnBw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mQnwZd2y2E+PbZ/WCc24FX5SYUqFVRfKZfEjSHAZL+g=; b=wMGo7Wd8+tEuAIxauVrw3S6TQHQYecDEqxQFWAw7PUhkee3XSGWiS2FvE+DnvDOQJn Zhvs7KQRAsfU0eEbFbMh6i8El6HUkbijZajsi5HCv94MDLAi33muVwBc8V13//U2s0hD ZZx7B/xfG+UiJLnQXYhDUBSXPPppAxcMcoG415uMTC6hLAnecJVFmzmdmhp5xyZvNwbg b417rlju+AN6NX9884b4ji6t2ENYVF+MTLP0txUM4XeNJ8jK0wcfV/fY+jtE7Dmf0uY4 CKwVkAVeJLA1h56ZYkKgEHR3rnfXJ8QHgbqU8hRzZ825XW37Xp7ciWnBp79VaBqHpSYW 9sbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="VeGyHLZ/"; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb24-20020a170907961800b0084d3d86379fsi17791840ejc.366.2023.01.13.07.32.26; Fri, 13 Jan 2023 07:32:39 -0800 (PST) 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=@collabora.com header.s=mail header.b="VeGyHLZ/"; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229604AbjAMPNq (ORCPT + 51 others); Fri, 13 Jan 2023 10:13:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbjAMPNP (ORCPT ); Fri, 13 Jan 2023 10:13:15 -0500 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 EA04A745BA; Fri, 13 Jan 2023 07:03:07 -0800 (PST) Received: from notapiano (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (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: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 6FB386602DD6; Fri, 13 Jan 2023 15:03:03 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1673622186; bh=fogr+uZTaVcUpklPH0FPHlfhwcndHj9i6ZT507O7UGQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VeGyHLZ/upyjgtilOjqJrXGwTdYKAMuw+7A7dyr+7WeRnHKKKpAPwDtpFEAC55HqS naqUxpBvDoZ9P9ht3i6t3ZEXKk5b9WmLI9n/8tytAi6e8cFgsQfoet7FFZ4p0OqE0J vUChAcB4qNG4RvZ8bnHQLBdHdeYjUyeB6fXdfFODBdughAm9Cd2057qXWs2e1iJGnF xIUZvk6pgWLB+yzlU8kIwuw4w2/oFNWSaoIHjRVBInek65tEXmjA0M7ocnqlaqzQ/W NiI+EqzJ9xwww7PUrDKKLn+MczaEkJQAHb3jFJTcOUCWabf63+uyqaGLibxHwZXdvj G0D0odut2rJbQ== Date: Fri, 13 Jan 2023 10:02:40 -0500 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Yunfei Dong =?utf-8?B?KOiRo+S6kemjnik=?= Cc: "angelogioacchino.delregno@collabora.com" , "nicolas@ndufresne.ca" , "robh+dt@kernel.org" , George Sun =?utf-8?B?KOWtmeaelyk=?= , Tiffany Lin =?utf-8?B?KOael+aFp+ePiik=?= , "stevecho@chromium.org" , "frkoenig@chromium.org" , Xiaoyong Lu =?utf-8?B?KOWNouWwj+WLhyk=?= , "devicetree@vger.kernel.org" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mchehab@kernel.org" , "daniel@ffwll.ch" , "linux-mediatek@lists.infradead.org" , "dri-devel@lists.freedesktop.org" , Irui Wang =?utf-8?B?KOeOi+eRnik=?= , "tfiga@google.com" , "benjamin.gaignard@collabora.com" , "hverkuil-cisco@xs4all.nl" , "linux-arm-kernel@lists.infradead.org" , "hsinyi@chromium.org" , "matthias.bgg@gmail.com" , Project_Global_Chrome_Upstream_Group , Andrew-CT Chen =?utf-8?B?KOmZs+aZuui/qik=?= , "acourbot@chromium.org" Subject: Re: [PATCH v7, 5/7] media: mediatek: vcodec: Different codec using different capture format Message-ID: <20230113150240.6tqi3kc7cdu3xr65@notapiano> References: <20220518123004.18286-1-yunfei.dong@mediatek.com> <20220518123004.18286-6-yunfei.dong@mediatek.com> <20230112205825.wb5qcqhh5kwvyi3y@notapiano> <2fe7132f2fcc3fb4724a34c3c4a918b821c845a3.camel@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2fe7132f2fcc3fb4724a34c3c4a918b821c845a3.camel@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,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 On Fri, Jan 13, 2023 at 03:25:46AM +0000, Yunfei Dong (董云飞) wrote: > Hi Nicolas, > > Thanks for your information. > On Thu, 2023-01-12 at 15:58 -0500, Nícolas F. R. A. Prado wrote: > > On Wed, May 18, 2022 at 08:30:02PM +0800, Yunfei Dong wrote: > > > Vp8 need to use MM21, but vp9 and h264 need to use HyFbc mode > > > for mt8195. Vp8/vp9/h264 use the same MM21 format for mt8192. > > > > Hi Yunfei, > > > > why do VP9 and H264 need to use HyFbc (is this the same as MT21C?) > > mode on > > MT8195? The SCP firmware on linux-firmware for MT8195 [1] only has > > MM21 > > available and based on my testing it works just fine. And contrary to > > what the > > commit message states this logic is also being applied to MT8192, > > preventing it > > to use MM21 when there are more than one format available. > > > The kernel driver not support dynamic switch mt21c and mm21. The driver > flow as below: > 1: If there are mt21c and mm21: h264/vp9/av1 will use mt21c(vp8 use > mm21 always); > 2: If there are only mt21c or mm21 will use this format only. > > But the scp.img is changed to support mt21c and mm21, the kernel driver > will use mt21c. Or force the kernel driver only support mm21(small > effort). > > But the best solution is changed the driver to dynamic switch mt21c and > mm21, need to discuss the enum and set format flow(middle effort). Agreed. The aim should be to get this dynamic format switching implemented in the driver so that the firmware can expose both formats and userspace can select any of them to use. However, as you said that solution will take more effort, so in the meantime, given that currently only mm21 is supported by gstreamer, I think forcing the kernel driver to always select mm21 makes the most sense right now. That way it doesn't matter whether the firmware has mm21 or mm21+mt21c, decoding will keep working with gstreamer using mm21. Thanks, Nícolas