[PATCH v5 3/7] clk: bcm: rpi: Mark PIXEL_CLK and HEVC_CLK as CLK_IGNORE_UNUSED
Maíra Canal
mcanal at igalia.com
Mon Feb 16 04:18:31 PST 2026
Hi Maxime,
On 16/02/26 07:53, Maxime Ripard wrote:
> Hi,
>
> On Fri, Feb 13, 2026 at 03:52:56PM -0300, Maíra Canal wrote:
>> If PIXEL_CLK or HEVC_CLK is disabled during boot, the firmware will skip
>> HSM initialization, which would result in a bus lockup. However, those
>> clocks are consumed by drivers (vc4 and HEVC decoder drivers,
>> respectively), which means that they can be enabled/disabled by the
>> drivers.
>>
>> Mark those clocks as CLK_IGNORE_UNUSED to allow them to be disabled by
>> drivers when appropriate.
>>
>> Acked-by: Melissa Wen <mwen at igalia.com>
>> Signed-off-by: Maíra Canal <mcanal at igalia.com>
>
> It looks like sync_state would be a better candidate to handle this?
I have the impression that CLK_IGNORE_UNUSED is still a better fit here.
First, the clock framework has no sync_state integration. The only use
of sync_state in clock drivers is done by Qualcomm's clock controllers,
which uses icc_sync_state for the interconnect framework. From my
understanding, CLK_IGNORE_UNUSED is the idiomatic mechanism for "don't
disable this clock during clk_disable_unused() and allow drivers to
manage it", which is exactly what we are looking for.
Apart from that, if we decide to use sync_state, I'm not sure we could
handle granularity. sync_state is a per-device mechanism, not per-clock,
and clk-raspberrypi provides multiple clocks (consumed by different
drivers). With CLK_IGNORE_UNUSED, the protection is per-clock: once a
driver calls clk_prepare_enable/unprepare() it manages that clock,
regardless of what other consumers of other clocks are doing.
Best regards,
- Maíra
>
> Maxime
More information about the linux-arm-kernel
mailing list