All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	Maoguang Meng <maoguang.meng@mediatek.com>,
	linux-media <linux-media@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support" 
	<linux-mediatek@lists.infradead.org>,
	devicetree <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 02/16] dt-bindings: media: mtk-vcodec: document SCP node
Date: Mon, 27 Jul 2020 11:12:30 -0300	[thread overview]
Message-ID: <CAAEAJfB1cBM-QCg1Sg6iwyQps7r6osY69p68Q-0_YzmSPhNgXw@mail.gmail.com> (raw)
In-Reply-To: <CAPBb6MW3AC2savGCHk8w98u1oRuZAs9m6sqz++ksJ58DGvJ5nQ@mail.gmail.com>

On Mon, 27 Jul 2020 at 06:06, Alexandre Courbot <acourbot@chromium.org> wrote:
>
> On Thu, Jul 23, 2020 at 6:37 AM Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar> wrote:
> >
> > On Mon, 13 Jul 2020 at 03:09, Alexandre Courbot <acourbot@chromium.org> wrote:
> > >
> > > The mediatek codecs can use either the VPU or the SCP as their interface
> > > to firmware. Reflect this in the DT bindings.
> > >
> > > Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
> > > Acked-by: Tiffany Lin <tiffany.lin@mediatek.com>
> > > ---
> > >  Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > index b6b5dde6abd8..7aef0a4fe207 100644
> > > --- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > +++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > @@ -19,7 +19,9 @@ Required properties:
> > >  - iommus : should point to the respective IOMMU block with master port as
> > >    argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
> > >    for details.
> > > -- mediatek,vpu : the node of video processor unit
> > > +One of the two following nodes:
> > > +- mediatek,vpu : the node of the video processor unit, if using VPU.
> > > +- mediatek,scp : the noode of the SCP unit, if using SCP.
> > >
> >
> > This interface doesn't enforce the fact only one of the two
> > should be present, but not both (which is the case, right?).
>
> That's correct.
>
> >
> > I hope I'm not bikeshedding here, but from an interface POV,
> > would it be cleaner to just have a single mediatek,coprocessor
> > property, and then use of_device_is_compatible
> > to distinguish VPU from SCP type?
>
> From an interface point of view maybe, however doing so would
> introduce a backward-incompatible change with the existing MT8173
> bindings. I also feel like it is less error-prone to have the property
> explicitly state what it is expecting at the other end of the phandle
> (vpu or scp) instead of the more generic "coprocessor".
>
> >
> > Moreover, I'd argue you don't need a dt-binding change
> > and should just keep the current mediatek-vpu property,
> > and then rely on of_device_is_compatible.
>
> VPU and SCP are different kinds of processors, so I'm not sure whether
> it is desirable to use VPU interchangeably like this. Note that I'm
> not strongly against it either, but for things like bindings I tend to
> prefer precise language to avoid confusions.

Yeah, I guess that makes sense.

Not only from a language precision point of view (after all
DT are not designed to be human readable).

But as you mention, given the processors will have different compatible
strings it would make sense to not allow overloading the property.

In any case, I don't have a strong opinion either.

Thanks,
Ezequiel

WARNING: multiple messages have this Message-ID (diff)
From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Maoguang Meng <maoguang.meng@mediatek.com>,
	devicetree <devicetree@vger.kernel.org>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/Mediatek SoC support"
	<linux-mediatek@lists.infradead.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH v3 02/16] dt-bindings: media: mtk-vcodec: document SCP node
Date: Mon, 27 Jul 2020 11:12:30 -0300	[thread overview]
Message-ID: <CAAEAJfB1cBM-QCg1Sg6iwyQps7r6osY69p68Q-0_YzmSPhNgXw@mail.gmail.com> (raw)
In-Reply-To: <CAPBb6MW3AC2savGCHk8w98u1oRuZAs9m6sqz++ksJ58DGvJ5nQ@mail.gmail.com>

On Mon, 27 Jul 2020 at 06:06, Alexandre Courbot <acourbot@chromium.org> wrote:
>
> On Thu, Jul 23, 2020 at 6:37 AM Ezequiel Garcia
> <ezequiel@vanguardiasur.com.ar> wrote:
> >
> > On Mon, 13 Jul 2020 at 03:09, Alexandre Courbot <acourbot@chromium.org> wrote:
> > >
> > > The mediatek codecs can use either the VPU or the SCP as their interface
> > > to firmware. Reflect this in the DT bindings.
> > >
> > > Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
> > > Acked-by: Tiffany Lin <tiffany.lin@mediatek.com>
> > > ---
> > >  Documentation/devicetree/bindings/media/mediatek-vcodec.txt | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > index b6b5dde6abd8..7aef0a4fe207 100644
> > > --- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > +++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
> > > @@ -19,7 +19,9 @@ Required properties:
> > >  - iommus : should point to the respective IOMMU block with master port as
> > >    argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
> > >    for details.
> > > -- mediatek,vpu : the node of video processor unit
> > > +One of the two following nodes:
> > > +- mediatek,vpu : the node of the video processor unit, if using VPU.
> > > +- mediatek,scp : the noode of the SCP unit, if using SCP.
> > >
> >
> > This interface doesn't enforce the fact only one of the two
> > should be present, but not both (which is the case, right?).
>
> That's correct.
>
> >
> > I hope I'm not bikeshedding here, but from an interface POV,
> > would it be cleaner to just have a single mediatek,coprocessor
> > property, and then use of_device_is_compatible
> > to distinguish VPU from SCP type?
>
> From an interface point of view maybe, however doing so would
> introduce a backward-incompatible change with the existing MT8173
> bindings. I also feel like it is less error-prone to have the property
> explicitly state what it is expecting at the other end of the phandle
> (vpu or scp) instead of the more generic "coprocessor".
>
> >
> > Moreover, I'd argue you don't need a dt-binding change
> > and should just keep the current mediatek-vpu property,
> > and then rely on of_device_is_compatible.
>
> VPU and SCP are different kinds of processors, so I'm not sure whether
> it is desirable to use VPU interchangeably like this. Note that I'm
> not strongly against it either, but for things like bindings I tend to
> prefer precise language to avoid confusions.

Yeah, I guess that makes sense.

Not only from a language precision point of view (after all
DT are not designed to be human readable).

But as you mention, given the processors will have different compatible
strings it would make sense to not allow overloading the property.

In any case, I don't have a strong opinion either.

Thanks,
Ezequiel

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  reply	other threads:[~2020-07-27 14:12 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  6:08 [PATCH v3 00/16] mtk-vcodec: venc: support for MT8183 and v4l2-compliance fixes Alexandre Courbot
2020-07-13  6:08 ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 01/16] media: mtk-vcodec: abstract firmware interface Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-22 21:23   ` Ezequiel Garcia
2020-07-22 21:23     ` Ezequiel Garcia
2020-07-27  9:06     ` Alexandre Courbot
2020-07-27  9:06       ` Alexandre Courbot
2020-07-27 14:24       ` Ezequiel Garcia
2020-07-27 14:24         ` Ezequiel Garcia
2020-07-27 14:25         ` Ezequiel Garcia
2020-07-27 14:25           ` Ezequiel Garcia
2020-08-21 10:35           ` Alexandre Courbot
2020-08-21 10:35             ` Alexandre Courbot
2020-08-21 10:34         ` Alexandre Courbot
2020-08-21 10:34           ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 02/16] dt-bindings: media: mtk-vcodec: document SCP node Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:20   ` Chen-Yu Tsai
2020-07-13  6:20     ` Chen-Yu Tsai
2020-08-21 10:35     ` Alexandre Courbot
2020-08-21 10:35       ` Alexandre Courbot
2020-07-22 21:37   ` Ezequiel Garcia
2020-07-22 21:37     ` Ezequiel Garcia
2020-07-27  9:06     ` Alexandre Courbot
2020-07-27  9:06       ` Alexandre Courbot
2020-07-27 14:12       ` Ezequiel Garcia [this message]
2020-07-27 14:12         ` Ezequiel Garcia
2020-07-13  6:08 ` [PATCH v3 03/16] media: mtk-vcodec: add SCP firmware ops Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-22 21:39   ` Ezequiel Garcia
2020-07-22 21:39     ` Ezequiel Garcia
2020-07-27  9:06     ` Alexandre Courbot
2020-07-27  9:06       ` Alexandre Courbot
2020-07-27 14:09       ` Ezequiel Garcia
2020-07-27 14:09         ` Ezequiel Garcia
2020-08-21 10:35         ` Alexandre Courbot
2020-08-21 10:35           ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 04/16] media: mtk-vcodec: venc: support SCP firmware Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-24 21:13   ` Ezequiel Garcia
2020-07-24 21:13     ` Ezequiel Garcia
2020-07-27  9:06     ` Alexandre Courbot
2020-07-27  9:06       ` Alexandre Courbot
2020-07-27 14:07       ` Ezequiel Garcia
2020-07-27 14:07         ` Ezequiel Garcia
2020-08-21 10:35         ` Alexandre Courbot
2020-08-21 10:35           ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 05/16] media: mtk-vcodec: venc: handle firmware version field Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 06/16] media: mtk-vcodec: venc: specify bitrate range per-chip Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 07/16] media: mtk-vcodec: venc: specify supported formats per-chip Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-26 14:29   ` Ezequiel Garcia
2020-07-26 14:29     ` Ezequiel Garcia
2020-07-27  9:06     ` Alexandre Courbot
2020-07-27  9:06       ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 08/16] dt-bindings: media: document mediatek,mt8183-vcodec-enc Alexandre Courbot
2020-07-13  6:08   ` [PATCH v3 08/16] dt-bindings: media: document mediatek, mt8183-vcodec-enc Alexandre Courbot
2020-07-13 23:34   ` [PATCH v3 08/16] dt-bindings: media: document mediatek,mt8183-vcodec-enc Rob Herring
2020-07-13 23:34     ` Rob Herring
2020-07-13  6:08 ` [PATCH v3 09/16] media: mtk-vcodec: add support for MT8183 encoder Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 10/16] Revert "media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding" Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 11/16] media: mtk-vcodec: venc support MIN_OUTPUT_BUFFERS control Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 12/16] media: mtk-vcodec: venc: set OUTPUT buffers field to V4L2_FIELD_NONE Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 13/16] media: mtk-vcodec: venc: use platform data for ENUM_FRAMESIZES Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 14/16] media: mtk-vcodec: venc: support ENUM_FRAMESIZES on OUTPUT formats Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 15/16] media: mtk-vcodec: venc: set default time per frame Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot
2020-07-13  6:08 ` [PATCH v3 16/16] media: mtk-vcodec: venc: fix invalid time per frame in S_PARM Alexandre Courbot
2020-07-13  6:08   ` Alexandre Courbot

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=CAAEAJfB1cBM-QCg1Sg6iwyQps7r6osY69p68Q-0_YzmSPhNgXw@mail.gmail.com \
    --to=ezequiel@vanguardiasur.com.ar \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=maoguang.meng@mediatek.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.