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 3/3] decoder: Add V4L2 stateless H.264 decoder driver
Date: Mon, 10 Nov 2025 12:05:19 +0800 [thread overview]
Message-ID: <56b943f0-d6d4-4210-8fb5-453326f277ba@amlogic.com> (raw)
In-Reply-To: <CAFBinCBy7vPq0oX0PQ=yC5E3Mx3sv6qdVHsMh-NQQzAkbDuvRQ@mail.gmail.com>
Hi
在 2025/11/9 6:53, Martin Blumenstingl 写道:
> [ EXTERNAL EMAIL ]
>
> Hello,
>
> thank you for your work on this!
>
> On Mon, Oct 27, 2025 at 6:42 AM Zhentao Guo via B4 Relay
> <devnull+zhentao.guo.amlogic.com@kernel.org> wrote:
> [...]
> +/**
> + * enum aml_power_type_e - Type of decoder power.
> + */
> +enum aml_power_type_e {
> + AML_PM_PD = 0,
> +};
> Are there any other power types that you are already aware of - or is
> this added "just in case" an additional type is needed in future?
Currently, this is the only type on S4 platform. The additional type is
needed ih the future.
>> +/**
>> + * struct gate_switch_node - clock node definition
>> + * @clk: Pointer to clk instance.
>> + * @name: Clock name used.
>> + * @mutex: Mutex lock for multi decoder instance.
>> + * @ref_count: Curr clk instance ref count.
>> + */
>> +struct gate_switch_node {
>> + struct clk *clk;
>> + const char *name;
>> + struct mutex mutex;
>> + int ref_count;
>> +};
> Generally I'm not sure if the whole struct is needed as I think the
> common clock framework has everything we need.
> There's struct clk_bulk_data which allows mapping clocks from
> device-tree to an array in the code.
>
> drivers/staging/media/starfive/camss/stf-camss.h for defines an enum
> (stf_clk) to access each of the clocks by it's index in the array.
> You even seem to have an enum (clk_type_e) which you could use to
> simplify the code.
>
> My understanding is that one can call clk_prepare_enable() and
> clk_disable_unprepare() as often as you'd like and these functions
> will do the ref-counting internally.
> So I think the ref_count is not explicitly needed, as that's managed
> by the common clock framework.
Thanks for reminding me of this, I'll check it. The field ref_count is
desigend for multi-instance decoding. More than one driver instance
reuse one decoder hardware. So we think this maybe still needed. Anyway,
we will take this into consideration.
>
> Best regards,
> Martin
Thanks
Zhentao
next prev parent reply other threads:[~2025-11-10 4:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 5:42 [PATCH 0/3] Add Amlogic stateless H.264 video decoder for S4 Zhentao Guo via B4 Relay
2025-10-27 5:42 ` [PATCH 1/3] dt-bindings: vdec: Add binding document of Amlogic decoder accelerator Zhentao Guo via B4 Relay
2025-10-27 13:05 ` Krzysztof Kozlowski
2025-10-28 11:14 ` Zhentao Guo
2025-10-28 11:33 ` Krzysztof Kozlowski
2025-10-28 12:23 ` Zhentao Guo
2025-10-27 5:42 ` [PATCH 2/3] dts: decoder: Support V4L2 stateless decoder dt node for S4 Zhentao Guo via B4 Relay
2025-10-27 13:06 ` Krzysztof Kozlowski
2025-10-28 11:18 ` Zhentao Guo
2025-10-27 5:42 ` [PATCH 3/3] decoder: Add V4L2 stateless H.264 decoder driver Zhentao Guo via B4 Relay
2025-10-27 13:10 ` Krzysztof Kozlowski
2025-10-28 11:22 ` Zhentao Guo
2025-10-28 11:01 ` Neil Armstrong
2025-10-28 12:16 ` Zhentao Guo
2025-11-08 22:53 ` Martin Blumenstingl
2025-11-10 4:05 ` Zhentao Guo [this message]
2025-10-27 12:57 ` [PATCH 0/3] Add Amlogic stateless H.264 video decoder for S4 Christian Hewitt
2025-10-28 11:08 ` Zhentao Guo
2025-10-30 10:50 ` Ferass El Hafidi
2025-10-31 2:32 ` Zhentao Guo
2025-10-28 10:50 ` Neil Armstrong
2025-10-28 11:47 ` Zhentao Guo
2025-11-04 7:28 ` Christian Hewitt
2025-11-04 16:13 ` Nicolas Dufresne
2025-11-05 9:26 ` Zhentao Guo
2025-11-05 13:51 ` Nicolas Dufresne
2025-11-06 2:44 ` 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=56b943f0-d6d4-4210-8fb5-453326f277ba@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;
as well as URLs for NNTP newsgroup(s).