Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6814733pxv; Fri, 30 Jul 2021 03:06:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGTF+zImFbK54PSZg4Ip03q8yrpoGdVuIGjPdpeTfawprATjgHl9q6VxlvvRLrBBWZBo9z X-Received: by 2002:a17:906:bcc7:: with SMTP id lw7mr1737766ejb.505.1627639591578; Fri, 30 Jul 2021 03:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627639591; cv=none; d=google.com; s=arc-20160816; b=TYPSEDk+geTLoowWgegWFWT1cMbeokOZkbosm1mezBtGxYUyEJvLi1w4UCdR2L9/Vc 8zATWqOcAb4mbHrdxMCORO0CMGc01vnb+8aS71Kbco5bv1TsHsPjNSxVIXc2bbYXCZ4q D91khbd8QlrUBpoQynOcW+pwPx9OIIOWAISrBDytt4+2RvS/1ONfyM57+/2vVbEnFXcj 5Quqn1zH7LvXEjC6UiTT0s210NXD9Kn0/7pk/lJQ5tBrWP8IdRom20TaYqoObWqNSGeK zFv0BLFis6mUgmOVqiJ3MBA//blMv7ajbMfVprW9jKux4uhcJSsoMuV0Ae/yI05QAp2O dxTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=2+kKtfU6rrNiF+8K/NSxwF+4D7nlKwWR6iHS3rg0AmM=; b=U+ACnQAPI17mmuih/2VkU/HTutDmqH7fuGIyQFvUYwKeZsA1rdzB1CmNmfL2TU7dRu B2c3RpQkm5zuJ9rEUYOIbi+Ow/8g7EhSvAaaN9aWhEA3u0VacKAxtM/HK7RrTNLeZ8h3 H0PMTwIT7m3tCm15IrbOzadvmLuf96746DxQgK9VpJfF577ejLz84r1go2WGHgAxcr6J W2UPOVWu46kXz56jK7aEJdpW8/VdrmX/M2WAxSFH2DAFdr1vc/9Jh59E/EjgHWLiTk9j SnnNNw8Ee8BNl/5VMgp0UHDknlGiVtGUTOtP/X+l+xqNFNlc2zGn4K63qSm+ql4oG+rr KLGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u6si1287296eju.58.2021.07.30.03.05.50; Fri, 30 Jul 2021 03:06:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238520AbhG3KEM (ORCPT + 99 others); Fri, 30 Jul 2021 06:04:12 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48164 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238396AbhG3KD4 (ORCPT ); Fri, 30 Jul 2021 06:03:56 -0400 Received: from [IPv6:2a02:810a:880:f54:51e7:d967:c146:d0c] (unknown [IPv6:2a02:810a:880:f54:51e7:d967:c146:d0c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dafna) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id EAD381F4479B; Fri, 30 Jul 2021 11:02:25 +0100 (BST) Subject: Re: [PATCH v3, 00/15] Using component framework to support multi hardware decode To: yunfei dong Cc: Hsin-Yi Wang , Fritz Koenig , Irui Wang , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Alexandre Courbot , Hans Verkuil , Tzung-Bi Shih , Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , Tomasz Figa References: <20210727101051.24418-1-yunfei.dong@mediatek.com> <2b562943-534a-b53d-696d-9f2a4836f76e@collabora.com> <1627546086.17009.7.camel@mhfsdcap03> From: Dafna Hirschfeld Message-ID: Date: Fri, 30 Jul 2021 12:02:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1627546086.17009.7.camel@mhfsdcap03> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.07.21 10:08, yunfei dong wrote: > On Tue, 2021-07-27 at 12:55 +0200, Dafna Hirschfeld wrote: >> Thank you for the patchset. >> >> Could you provide information on how you >> tested the code. >> Did you test it on chromeos userspace? >> Did you use the test-tast framework? >> What tests did you run? >> >> Dafna >> > Hi Dafna, > > I just merge the code to kernel 4.19 and build pass. Since those patches are sent to upstream , you should probably also make sure that they are built on the media_tree repo. > When the system boot up, I will play some vdec h264/vp8/vp9 bitstreams. > The code should be ok when all bitstreams can play well. > > For MT8173 is statefull decode, I won't change the arch and component is > used for stateless decode(mt8192), mt8183 not use component arch also. > Only if decode driver can play well, the change should be ok for mt8173. > > I needn't to do tast test for mt8173 for the arch not be changed. But the frist patches in that series are general bug fixes that influance all arch Thanks, Dafna > > Thanks, > Yunfei Dong >> >> On 27.07.21 12:10, Yunfei Dong wrote: >>> This series adds support for multi hardware decode into mtk-vcodec, by first >>> adding component framework to manage each hardware information: interrupt, >>> clock, register bases and power. Secondly add core thread to deal with core >>> hardware message, at the same time, add msg queue for different hardware >>> share messages. Lastly, the architecture of different specs are not the same, >>> using specs type to separate them. >>> >>> This series has been tested with both MT8183 and MT8173. Decoding was working >>> for both chips. >>> >>> Patches 1,2 rewrite get register bases and power on/off interface. >>> >>> Patch 3-5 add component framework to support multi hardware. >>> >>> Patches 6-14 add interfaces to support core hardware. >>> ---- >>> This patch dependents on "media: mtk-vcodec: support for MT8183 decoder"[1]. >>> >>> Multi hardware decode is based on stateless decoder, MT8183 is the first time >>> to add stateless decoder. Otherwise it will cause conflict. Please also accept >>> this patch together with [1]. >>> >>> [1]https://lore.kernel.org/patchwork/project/lkml/list/?series=507084 >>> ---- >>> Changes compared with v2: >>> - Fix return value for patch 1/15 >>> - Add this new patch to align vdec and venc wake up ctx interface for patch 2/15 >>> - Fix comments for patch 4/15 >>> - Change txt files to yaml for patch 5/15 >>> - Generalize wake up ctx interface for stateless and stateful decode for patch 7/15 >>> - Add document for structs and functions for patch 8/15 >>> - Add condition to check the return value of kthread_run for patch 11/15 >>> - Fix yaml check fail for patch 13/15 >>> >>> Changes compared with v1: >>> - Fix many comments for patch 3/14 >>> - Remove unnecessary code for patch 4/14 >>> - Using enum mtk_vdec_hw_count instead of magic numbers for patch 6/14 >>> - Reconstructed get/put lat buffer for lat and core hardware for patch 7/14 >>> - Using yaml format to instead of txt file for patch 12/14 >>> >>> Yunfei Dong (15): >>> media: mtk-vcodec: Get numbers of register bases from DT >>> media: mtk-vcodec: Align vcodec wake up interrupt interface >>> media: mtk-vcodec: Refactor vcodec pm interface >>> media: mtk-vcodec: Use component framework to manage each hardware >>> information >>> dt-bindings: media: mtk-vcodec: Separate video encoder and decoder >>> dt-bindings >>> media: mtk-vcodec: Use pure single core for MT8183 >>> media: mtk-vcodec: Add irq interface for multi hardware >>> media: mtk-vcodec: Add msg queue feature for lat and core architecture >>> media: mtk-vcodec: Generalize power and clock on/off interfaces >>> media: mtk-vcodec: Add new interface to lock different hardware >>> media: mtk-vcodec: Add core thread >>> media: mtk-vcodec: Support 34bits dma address for vdec >>> dt-bindings: media: mtk-vcodec: Adds decoder dt-bindings for mt8192 >>> media: mtk-vcodec: Add core dec and dec end ipi msg >>> media: mtk-vcodec: Use codec type to separate different hardware >>> >>> .../media/mediatek,vcodec-comp-decoder.yaml | 154 +++++++++ >>> .../media/mediatek,vcodec-decoder.yaml | 138 ++++++++ >>> .../media/mediatek,vcodec-encoder.yaml | 128 ++++++++ >>> .../bindings/media/mediatek-vcodec.txt | 130 -------- >>> drivers/media/platform/mtk-vcodec/Makefile | 2 + >>> .../platform/mtk-vcodec/mtk_vcodec_dec.c | 4 +- >>> .../platform/mtk-vcodec/mtk_vcodec_dec.h | 1 + >>> .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c | 296 +++++++++++++++--- >>> .../platform/mtk-vcodec/mtk_vcodec_dec_hw.c | 184 +++++++++++ >>> .../platform/mtk-vcodec/mtk_vcodec_dec_hw.h | 48 +++ >>> .../platform/mtk-vcodec/mtk_vcodec_dec_pm.c | 98 ++++-- >>> .../platform/mtk-vcodec/mtk_vcodec_dec_pm.h | 13 +- >>> .../mtk-vcodec/mtk_vcodec_dec_stateful.c | 1 + >>> .../mtk-vcodec/mtk_vcodec_dec_stateless.c | 1 + >>> .../platform/mtk-vcodec/mtk_vcodec_drv.h | 76 ++++- >>> .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 12 +- >>> .../platform/mtk-vcodec/mtk_vcodec_enc_pm.c | 1 - >>> .../platform/mtk-vcodec/mtk_vcodec_intr.c | 27 +- >>> .../platform/mtk-vcodec/mtk_vcodec_intr.h | 4 +- >>> .../platform/mtk-vcodec/mtk_vcodec_util.c | 87 ++++- >>> .../platform/mtk-vcodec/mtk_vcodec_util.h | 8 +- >>> .../platform/mtk-vcodec/vdec/vdec_h264_if.c | 2 +- >>> .../mtk-vcodec/vdec/vdec_h264_req_if.c | 2 +- >>> .../platform/mtk-vcodec/vdec/vdec_vp8_if.c | 2 +- >>> .../platform/mtk-vcodec/vdec/vdec_vp9_if.c | 2 +- >>> .../media/platform/mtk-vcodec/vdec_drv_if.c | 21 +- >>> .../media/platform/mtk-vcodec/vdec_ipi_msg.h | 16 +- >>> .../platform/mtk-vcodec/vdec_msg_queue.c | 290 +++++++++++++++++ >>> .../platform/mtk-vcodec/vdec_msg_queue.h | 157 ++++++++++ >>> .../media/platform/mtk-vcodec/vdec_vpu_if.c | 46 ++- >>> .../media/platform/mtk-vcodec/vdec_vpu_if.h | 22 ++ >>> .../platform/mtk-vcodec/venc/venc_h264_if.c | 2 +- >>> .../platform/mtk-vcodec/venc/venc_vp8_if.c | 2 +- >>> 33 files changed, 1697 insertions(+), 280 deletions(-) >>> create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-comp-decoder.yaml >>> create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-decoder.yaml >>> create mode 100644 Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml >>> delete mode 100644 Documentation/devicetree/bindings/media/mediatek-vcodec.txt >>> create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.c >>> create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_hw.h >>> create mode 100644 drivers/media/platform/mtk-vcodec/vdec_msg_queue.c >>> create mode 100644 drivers/media/platform/mtk-vcodec/vdec_msg_queue.h >>> >