lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56b943f0-d6d4-4210-8fb5-453326f277ba@amlogic.com>
Date: Mon, 10 Nov 2025 12:05:19 +0800
From: Zhentao Guo <zhentao.guo@...ogic.com>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>, Rob Herring
 <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>,
 Neil Armstrong <neil.armstrong@...aro.org>,
 Kevin Hilman <khilman@...libre.com>, Jerome Brunet <jbrunet@...libre.com>,
 linux-media@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH 3/3] decoder: Add V4L2 stateless H.264 decoder driver

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@...nel.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ