From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CD6DC43334 for ; Mon, 20 Jun 2022 06:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237592AbiFTGbi (ORCPT ); Mon, 20 Jun 2022 02:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbiFTGbi (ORCPT ); Mon, 20 Jun 2022 02:31:38 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 733F963FE; Sun, 19 Jun 2022 23:31:36 -0700 (PDT) X-UUID: 3e37489b9576495eb89653281161de40-20220620 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.6,REQID:e245270b-27b5-4318-8799-9759d819e80e,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:-5 X-CID-META: VersionHash:b14ad71,CLOUDID:b341fae9-f7af-4e69-92ee-0fd74a0c286c,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,QS:nil,BEC:nil,COL:0 X-UUID: 3e37489b9576495eb89653281161de40-20220620 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1640627295; Mon, 20 Jun 2022 14:31:31 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Mon, 20 Jun 2022 14:31:29 +0800 Received: from mhfsdcap04 (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 20 Jun 2022 14:31:27 +0800 Message-ID: <1b01b9a12d8ffe19aa37e23c644204203ff2db25.camel@mediatek.com> Subject: Re: [PATCH] media: mediatek: vcodec: Initialize decoder parameters after getting dec_capability From: "yunfei.dong@mediatek.com" To: Chen-Yu Tsai , Hans Verkuil CC: Nicolas Dufresne , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa , George Sun , Xiaoyong Lu , "Hsin-Yi Wang" , Fritz Koenig , "Daniel Vetter" , dri-devel , "Irui Wang" , Steve Cho , , , , , , Date: Mon, 20 Jun 2022 14:31:27 +0800 In-Reply-To: References: <20220618072929.28783-1-yunfei.dong@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Chen-Yu, Thanks for your suggestion. On Mon, 2022-06-20 at 13:25 +0800, Chen-Yu Tsai wrote: > On Mon, Jun 20, 2022 at 12:54 PM Chen-Yu Tsai > wrote: > > > > On Sat, Jun 18, 2022 at 3:29 PM Yunfei Dong < > > yunfei.dong@mediatek.com> wrote: > > > > > > Need to get dec_capability from scp first, then initialize > > > decoder > > > supported format and other parameters according to dec_capability > > > value. > > > > > > Signed-off-by: Yunfei Dong > > > > Reviewed-by: Chen-Yu Tsai > > Tested-by: Chen-Yu Tsai > > > > Tested on MT8183 on mainline 20220617-next with the vcodec-dec DT > > node > > copied from the ChromeOS v5.10 kernel. > > > > This fixes an issue where the first attempt to enumerate formats on > > the > > device right after boot returns an empty list. > > BTW, this should have a Fixes tag. > > Either > > Fixes: 7a7ae26fd458 ("media: mediatek: vcodec: support stateless VP8 > decoding") > > which looks like the first instance of when firmware capability > really is > considered, or > > Fixes: fd00d90330d1 ("media: mtk-vcodec: vdec: move stateful ops into > their own file") > > which matches when ctx->dev->vdec_pdata->init_vdec_params(ctx) was > first added. > > > ChenYu I will fix the patch in v2. Best Regards, Yunfei Dong