mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Zhentao Guo <zhentao.guo@amlogic.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH RFC v2 1/3] media: dt-bindings: Add Amlogic V4L2 video decoder
Date: Wed, 17 Dec 2025 10:38:33 +0800	[thread overview]
Message-ID: <7ea65b00-a2d9-471c-bc3d-cc340ee1046d@amlogic.com> (raw)
In-Reply-To: <CAFBinCDO5UWVEtbOOdMn9vy=0H2Q1hJDKhH+X7i0nMsSsw=wbg@mail.gmail.com>

Hi Martain,

在 2025/12/17 7:43, Martin Blumenstingl 写道:
> [ EXTERNAL EMAIL ]
>
> Hi,
>
> On Mon, Nov 24, 2025 at 4:32 AM Zhentao Guo via B4 Relay
> <devnull+zhentao.guo.amlogic.com@kernel.org> wrote:
>> From: Zhentao Guo <zhentao.guo@amlogic.com>
>>
>> Describe the initial support for the V4L2 stateless video decoder
>> driver used with the Amlogic S4 (S805X2) platform.
>>
>> Signed-off-by: Zhentao Guo <zhentao.guo@amlogic.com>
>> ---
>>   .../bindings/media/amlogic,s4-vcodec-dec.yaml      | 87 ++++++++++++++++++++++
>>   1 file changed, 87 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/media/amlogic,s4-vcodec-dec.yaml b/Documentation/devicetree/bindings/media/amlogic,s4-vcodec-dec.yaml
>> new file mode 100644
>> index 000000000000..401a5a32902e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/amlogic,s4-vcodec-dec.yaml
>> @@ -0,0 +1,87 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +# Copyright (C) 2025 Amlogic, Inc. All rights reserved
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/media/amlogic,vcodec-dec.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Amlogic Video Decode Accelerator
>> +
>> +maintainers:
>> +  - Zhentao Guo <zhentao.guo@amlogic.com>
>> +
>> +description:
>> +  The Video Decoder Accelerator present on Amlogic SOCs.
>> +  It supports stateless h264 decoding.
>> +
>> +properties:
>> +  compatible:
>> +    const: amlogic,s4-vcodec-dec
>> +
>> +  reg:
>> +    maxItems: 2
>> +
>> +  reg-names:
>> +    items:
>> +      - const: dos
>> +      - const: dmc
> Neil has commented on the driver patch (in v1) to use the existing
> canvas driver.
> The same applies to the binding: you can replace the whole "dmc"
> registers with an "amlogic,canvas" property (see
> Documentation/devicetree/bindings/display/amlogic,meson-vpu.yaml for
> an example).

Indeed, only a section of the dmc registers is for canvas. For the reset 
part of the registers, canvas driver should not access them directely.

For example, on S805X2 platform, the DMC registers range from 0xfe036000 
to 0xfe038000. The canvas registers only range from 0xfe036048 
to 0xfe03605c.

The decoder driver also need to access the register 0xfe036000, which is 
not contained in the range of canvas registers, so we still need to 
remap this register in the decoder driver. Therefore, the property 'dmc' 
is still needed.

>
> [...]
>> +required:
>> +  - compatible
>> +  - reg
>> +  - reg-names
>> +  - interrupts
>> +  - clocks
>> +  - clock-names
>> +  - power-domains
>> +  - power-domain-names
> I did a quick:
> $ git grep RESET_DOS
> {include/dt-bindings/reset/amlogic,arch/arm64/boot/dts/amlogic/}*.h
> -> that lists DOS reset lines for most (all?) SoCs that were supported
> by the old vdec driver as well as DOS reset lines for the S4 SoC (for
> which you're adding support here).
> If some of those reset lines are wired in hardware to the DOS region
> then you should include them in the binding.
> For reference in case you are not already familiar with it: [0] "[...]
> make bindings complete even if a driver doesn’t support some features.
> For example, if a device has an interrupt, then include the
> ‘interrupts’ property even if the driver is only polled mode".
> (the same also applies to any additional clocks or power-domains that
> are wired as inputs into the hardware which you have not listed yet as
> they are not needed for the initially supported codecs)
Yes, I also noticed this issue. The DOS reset line should be added. We 
will fix this in the next patch version. Thanks for your suggestions!
> Best regards,
> Martin
>
BRs

Zhentao

> [0] https://docs.kernel.org/devicetree/bindings/writing-bindings.html

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

  reply	other threads:[~2025-12-17  2:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24  3:32 [PATCH RFC v2 0/3] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2025-11-24  3:32 ` [PATCH RFC v2 1/3] media: dt-bindings: Add Amlogic V4L2 video decoder Zhentao Guo via B4 Relay
2025-11-25 11:31   ` Krzysztof Kozlowski
2025-11-25 11:45     ` Zhentao Guo
2025-12-16 23:43   ` Martin Blumenstingl
2025-12-17  2:38     ` Zhentao Guo [this message]
2025-11-24  3:32 ` [PATCH RFC v2 2/3] decoder: Add V4L2 stateless H.264 decoder driver Zhentao Guo via B4 Relay
2025-12-11 19:53   ` Nicolas Dufresne
2025-12-12  4:11     ` Zhentao Guo
2025-12-12 13:51       ` Nicolas Dufresne
2025-12-15  2:15         ` Zhentao Guo
2025-12-15 13:58           ` Nicolas Dufresne
2025-12-16  2:36             ` Zhentao Guo
2025-12-16  2:36             ` Zhentao Guo
2025-11-24  3:32 ` [PATCH RFC v2 3/3] arm64: dts: amlogic: Add video decoder driver support for S4 SOCs Zhentao Guo via B4 Relay
2025-11-24 14:28 ` [PATCH RFC v2 0/3] Add Amlogic stateless H.264 video decoder for S4 Rob Herring
2025-11-25  3:24   ` Zhentao Guo
2025-11-25 11:29     ` Krzysztof Kozlowski
2025-11-25 11:47       ` Zhentao Guo
2025-11-25 10:55 ` Ferass El Hafidi
2025-11-25 11:15   ` Zhentao Guo

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=7ea65b00-a2d9-471c-bc3d-cc340ee1046d@amlogic.com \
    --to=zhentao.guo@amlogic.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mchehab@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.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