From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
kernel@collabora.com,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Yunfei Dong <yunfei.dong@mediatek.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH v3 3/6] media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183
Date: Tue, 27 Jun 2023 17:38:30 -0400 [thread overview]
Message-ID: <51dfbae5-4250-4b89-adb5-ff0ebf52cc52@notapiano> (raw)
In-Reply-To: <9bf3f3d0-9655-3549-1d1b-02816f51b666@linaro.org>
On Mon, Jun 26, 2023 at 05:30:07PM +0200, Krzysztof Kozlowski wrote:
> On 26/06/2023 15:54, Nícolas F. R. A. Prado wrote:
> > On Fri, Jun 23, 2023 at 06:21:31PM +0200, Krzysztof Kozlowski wrote:
> >> On 21/06/2023 20:00, Nícolas F. R. A. Prado wrote:
> >>>>
> >>>> But anyway this variant comes with some set of regs and reg-names. Other
> >>>> variant comes with different set. In all cases they should be defined,
> >>>> even by "defined" means not allowed.
> >>>
> >>> I'm not sure what you mean. Are you suggesting to disable reg-names on mt8173?
> >>
> >> That's one of the options if for some reason you don't want to define them.
> >>
> >>>
> >>>>
> >>>>>
> >>>>> But in a separate series we could drop vdecsys from mt8173's reg as well,
> >>>>> passing it as a syscon instead, which would solve the warning on that platform,
> >>>>> though some more driver changes would be needed to be able to handle it for that
> >>>>> SoC. The newer SoCs like mt8192, mt8195, etc, should also get vdecsys dropped
> >>>>> from their regs to have a correct memory description.
> >>>>>
> >>>>
> >>>> Sure, but I don't understand how does it affect defining and making
> >>>> specific regs/reg-names or keeping them loose.
> >>>
> >>> We need some way to tell in the driver whether the first reg is VDEC_SYS or not.
> >>> Since so far reg-names have not been used for the vcodec, the simplest, and
> >>> cleanest, way to do it, is to add reg-names when VDEC_SYS is not present. When
> >>> the other SoCs are updated to no longer have the first reg as VDEC_SYS, they
> >>> would also have reg-names added to their binding, to clearly indicate that.
> >>
> >> Don't use reg-names for that. The order of entries is anyway strict.
> >
> > Since the order of entries is strict, if I remove VDEC_SYS from mt8183, I also
> > need to remove it from mt8173, is that what you mean?
>
> It's different compatible, so it can have different entries.
>
>
> > I would still check for
> > the presence of reg-names in the driver to differentiate whether the old or new
> > binding is used, you just don't want different reg-names between compatibles in
> > the binding?
>
> I wrote already what I want:
>
> In all cases they should be defined, even by "defined" means not allowed.
>
> Now of course the best would be if the reg-names are always the same, at
> least in respect of order of items. This is what we try to do for all
> devices.
>
> >
> >>
> >>>
> >>> For example, for mt8173 we currently have
> >>>
> >>> vcodec_dec: vcodec@16000000 {
> >>> compatible = "mediatek,mt8173-vcodec-dec";
> >>> reg = <0 0x16000000 0 0x100>, /* VDEC_SYS */
> >>> <0 0x16020000 0 0x1000>, /* VDEC_MISC */
> >>> <0 0x16021000 0 0x800>, /* VDEC_LD */
> >>> <0 0x16021800 0 0x800>, /* VDEC_TOP */
> >>> <0 0x16022000 0 0x1000>, /* VDEC_CM */
> >>> <0 0x16023000 0 0x1000>, /* VDEC_AD */
> >>> <0 0x16024000 0 0x1000>, /* VDEC_AV */
> >>> <0 0x16025000 0 0x1000>, /* VDEC_PP */
> >>> <0 0x16026800 0 0x800>, /* VDEC_HWD */
> >>> <0 0x16027000 0 0x800>, /* VDEC_HWQ */
> >>> <0 0x16027800 0 0x800>, /* VDEC_HWB */
> >>> <0 0x16028400 0 0x400>; /* VDEC_HWG */
> >>>
> >>> In a future series, when removing VDEC_SYS from it, it would become
> >>>
> >>> vcodec_dec: vcodec@16020000 {
> >>> compatible = "mediatek,mt8173-vcodec-dec";
> >>> reg = <0 0x16020000 0 0x1000>, /* VDEC_MISC */
> >>> <0 0x16021000 0 0x800>, /* VDEC_LD */
> >>> <0 0x16021800 0 0x800>, /* VDEC_TOP */
> >>> <0 0x16022000 0 0x1000>, /* VDEC_CM */
> >>> <0 0x16023000 0 0x1000>, /* VDEC_AD */
> >>> <0 0x16024000 0 0x1000>, /* VDEC_AV */
> >>> <0 0x16025000 0 0x1000>, /* VDEC_PP */
> >>> <0 0x16026800 0 0x800>, /* VDEC_HWD */
> >>> <0 0x16027000 0 0x800>, /* VDEC_HWQ */
> >>> <0 0x16027800 0 0x800>, /* VDEC_HWB */
> >>> <0 0x16028400 0 0x400>; /* VDEC_HWG */
> >>> reg-names = "misc", "ld", "top", "cm", "ad", "av", "pp",
> >>> "hwd", "hwq", "hwb", "hwg";
> >>
> >> So you want to use reg-names to avoid ABI break. This is not the reason
> >> not to define reg-names for other case.
> >
> > There will be an ABI break anyway when the first reg is removed (as shown
> > above), I'm just trying to avoid churn: adding a reg-name that will be removed
> > later.
>
> So remove the reg-name now and there will be no "later"?
OK, I'll send a v4 with VDEC_SYS also removed from mt8173.
Thanks,
Nícolas
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-06-27 21:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 0:03 [PATCH v3 0/6] Enable decoder for mt8183 Nícolas F. R. A. Prado
2023-06-20 0:03 ` [PATCH v3 1/6] media: dt-bindings: mediatek,vcodec: Allow single clock " Nícolas F. R. A. Prado
2023-06-20 8:11 ` Krzysztof Kozlowski
2023-06-20 0:03 ` [PATCH v3 2/6] media: dt-bindings: mediatek,vcodec: Don't require assigned-clocks Nícolas F. R. A. Prado
2023-06-20 0:03 ` [PATCH v3 3/6] media: dt-bindings: mediatek,vcodec: Remove VDEC_SYS for mt8183 Nícolas F. R. A. Prado
2023-06-20 8:12 ` Krzysztof Kozlowski
2023-06-20 12:46 ` Nícolas F. R. A. Prado
2023-06-20 13:00 ` Krzysztof Kozlowski
2023-06-20 16:31 ` Nícolas F. R. A. Prado
2023-06-21 8:41 ` Krzysztof Kozlowski
2023-06-21 18:00 ` Nícolas F. R. A. Prado
2023-06-23 16:21 ` Krzysztof Kozlowski
2023-06-26 13:54 ` Nícolas F. R. A. Prado
2023-06-26 15:30 ` Krzysztof Kozlowski
2023-06-27 21:38 ` Nícolas F. R. A. Prado [this message]
2023-06-20 0:03 ` [PATCH v3 4/6] media: mediatek: vcodec: Define address for VDEC_HW_ACTIVE Nícolas F. R. A. Prado
2023-06-20 7:43 ` AngeloGioacchino Del Regno
2023-06-20 0:03 ` [PATCH v3 5/6] media: mediatek: vcodec: Read HW active status from syscon on MT8183 Nícolas F. R. A. Prado
2023-06-20 8:05 ` AngeloGioacchino Del Regno
2023-06-20 0:03 ` [PATCH v3 6/6] arm64: dts: mediatek: mt8183: Add decoder Nícolas F. R. A. Prado
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=51dfbae5-4250-4b89-adb5-ff0ebf52cc52@notapiano \
--to=nfraprado@collabora.com \
--cc=andrew-ct.chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel@collabora.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--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=tiffany.lin@mediatek.com \
--cc=yunfei.dong@mediatek.com \
/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