From: "Irui Wang (王瑞)" <Irui.Wang@mediatek.com>
To: "ezequiel@vanguardiasur.com.ar" <ezequiel@vanguardiasur.com.ar>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"frkoenig@chromium.org" <frkoenig@chromium.org>,
"Tiffany Lin (林慧珊)" <tiffany.lin@mediatek.com>,
"Longfei Wang (王龙飞)" <Longfei.Wang@mediatek.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Maoguang Meng (孟毛广)" <Maoguang.Meng@mediatek.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"tzungbi@chromium.org" <tzungbi@chromium.org>,
"Yunfei Dong (董云飞)" <Yunfei.Dong@mediatek.com>,
"Yong Wu (吴勇)" <Yong.Wu@mediatek.com>,
srv_heupstream <srv_heupstream@mediatek.com>,
"tfiga@google.com" <tfiga@google.com>,
"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>,
"hsinyi@chromium.org" <hsinyi@chromium.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"Andrew-CT Chen (陳智迪)" <Andrew-CT.Chen@mediatek.com>,
"acourbot@chromium.org" <acourbot@chromium.org>
Subject: Re: [PATCH 1/9] dt-bindings: media: mtk-vcodec: Add binding for MT8195 two venc cores
Date: Wed, 25 Aug 2021 07:16:51 +0000 [thread overview]
Message-ID: <fb5fcb7b315f891a9bf87bd5bbe335ee46f5532c.camel@mediatek.com> (raw)
In-Reply-To: <CAAEAJfBvWDqtb8oqxx9zosEbBhFVMiszG2cu=Y7OXx3-T4gAOQ@mail.gmail.com>
On Wed, 2021-08-25 at 00:49 -0300, Ezequiel Garcia wrote:
> On Tue, 24 Aug 2021 at 23:04, Irui Wang (王瑞) <Irui.Wang@mediatek.com>
> wrote:
> >
> > Hi,Ezequiel,
> >
> > Thanks for your reviewing.
> >
> > On Tue, 2021-08-24 at 08:02 -0300, Ezequiel Garcia wrote:
> > > Hi Irui,
> > >
> > > On Mon, 16 Aug 2021 at 08:00, Irui Wang <irui.wang@mediatek.com>
> > > wrote:
> > > >
> > > > Enable MT8195 two H.264 venc cores, updates vcodec binding
> > > > document.
> > > >
> > > > Signed-off-by: Irui Wang <irui.wang@mediatek.com>
> > > > ---
> > > > Documentation/devicetree/bindings/media/mediatek-vcodec.txt |
> > > > 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/media/mediatek-
> > > > vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-
> > > > vcodec.txt
> > > > index de961699ba0a..eb2e24c32426 100644
> > > > --- a/Documentation/devicetree/bindings/media/mediatek-
> > > > vcodec.txt
> > > > +++ b/Documentation/devicetree/bindings/media/mediatek-
> > > > vcodec.txt
> > > > @@ -11,6 +11,8 @@ Required properties:
> > > > "mediatek,mt8173-vcodec-dec" for MT8173 decoder.
> > > > "mediatek,mt8192-vcodec-enc" for MT8192 encoder.
> > > > "mediatek,mt8195-vcodec-enc" for MT8195 encoder.
> > > > + "mediatek,mtk-venc-core0" for MT8195 avc core0 device.
> > > > + "mediatek,mtk-venc-core1" for MT8195 avc core1 device.
> > >
> > > What is the difference between core0 and core1?
> > >
> > > Thanks,
> > > Ezequiel
> >
> > Both core0 and core1 are H264 encoder hardware, they have their own
> > hardware register base, used power-domains/clocks/irqs. We can use
> > any
> > of them for H.264 encoding, but the two cores can work together for
> > higher performance, it's called "frame racing", a hardware encoding
> > mode, control flow just like in the commit messages:
> >
> > core0 frame#0.frame#2.frame#4...
> > core1 frame#1.frame#3.frame#5...
> >
>
> If they are two encoder cores, why do you need different compatible
> strings?
>
> It would be interesting to see a device tree which shows how this
> should
> be used in the real world, but from the looks of it, it seems you
> don't
> need a separate compatible.
>
We want to use the two cores through one device node, core0 and core1
bind to device "mediatek,mt8195-vcodec-enc", it's feasible to make two
cores work by just opening one device, the device tree looks like:
venc {
compatible = "mediatek,mt8195-vcodec-enc"
}
venc_core0 {
compatible = "mediatek,mtk-venc-core0"
interrupts = xxxx
clocks = xxxx
power-domains = xxxx
...
}
venc_core1 {
compatible = "mediatek,mtk-venc-core1"
interrupts = xxxx
clocks = xxxx
power-domains = xxxx
...
}
as you can see, node "venc" just has compatible string, it's just used
for register "/dev/videoX" device node in probe process. The encoder
real hardware device are node "venc_core0" and "venc_core1", bind them
to "venc" in probe process.
> It seems this series is somewhat related to Yunfei's "[PATCH v5,
> 00/15] Using component framework to support multi hardware decode",
> but I don't see a device tree patch either in that series.
>
> Given this is a complex architecture, I don't know if it
> makes sense to discuss decoder and encoder independently.
>
> If you guys unify the two series, and add the device tree patches for
> it,
> or at least for the most complex cases, maybe that will surface the
> architecture more clearly and come up with an easier solution that
> doesn't involve
> an async framework to pull in the parts together.
>
> Thanks,
> Ezequiel
Yes, this series have a similar purpose with Yunfei's patch, he has a
requirement for dual cores decoder, mine are dual cores encoder, about
the usage of framework component, it can be discussed together.
Thanks
next prev parent reply other threads:[~2021-08-25 7:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 10:59 [PATCH 0/9] Enable two H264 encoder cores on MT8195 Irui Wang
2021-08-16 10:59 ` [PATCH 1/9] dt-bindings: media: mtk-vcodec: Add binding for MT8195 two venc cores Irui Wang
2021-08-18 0:09 ` Rob Herring
2021-08-24 11:02 ` Ezequiel Garcia
2021-08-25 2:02 ` Irui Wang (王瑞)
2021-08-25 3:49 ` Ezequiel Garcia
2021-08-25 7:16 ` Irui Wang (王瑞) [this message]
2021-08-16 10:59 ` [PATCH 2/9] media: mtk-vcodec: Use component framework to manage encoder hardware Irui Wang
2021-08-23 10:01 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 3/9] media: mtk-vcodec: Rewrite venc power manage interface Irui Wang
2021-08-23 10:16 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 4/9] media: mtk-vcodec: Add venc power on/off interface Irui Wang
2021-08-24 9:53 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 5/9] media: mtk-vcodec: Rewrite venc clock interface Irui Wang
2021-08-24 10:24 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 6/9] media: mtk-vcodec: Add new venc drv interface for frame_racing mode Irui Wang
2021-08-24 18:54 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 7/9] media: mtk-vcodec: Add frame racing mode encode process Irui Wang
2021-08-24 19:20 ` Tzung-Bi Shih
2021-08-16 10:59 ` [PATCH 8/9] media: mtk-vcodec: Return encode result to client Irui Wang
2021-08-16 10:59 ` [PATCH 9/9] media: mtk-vcodec: Add delayed worker for encode timeout Irui Wang
2021-11-25 10:17 ` [PATCH 0/9] Enable two H264 encoder cores on MT8195 AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb5fcb7b315f891a9bf87bd5bbe335ee46f5532c.camel@mediatek.com \
--to=irui.wang@mediatek.com \
--cc=Andrew-CT.Chen@mediatek.com \
--cc=Longfei.Wang@mediatek.com \
--cc=Maoguang.Meng@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=Yong.Wu@mediatek.com \
--cc=Yunfei.Dong@mediatek.com \
--cc=acourbot@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=frkoenig@chromium.org \
--cc=hsinyi@chromium.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=robh+dt@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=tfiga@google.com \
--cc=tiffany.lin@mediatek.com \
--cc=tzungbi@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).