Re: [PATCH] media: venus: pm_helpers: add fallback for the opp-table
From: Konrad Dybcio
Date: Wed Jul 23 2025 - 09:33:02 EST
On 7/23/25 3:30 PM, Konrad Dybcio wrote:
> On 7/23/25 2:56 PM, Renjiang Han wrote:
>> Since the device trees for both HFI_VERSION_1XX and HFI_VERSION_3XX
>> do not include an opp-table and have not configured opp-pmdomain, they
>> still need to use the frequencies defined in the driver's freq_tbl.
>>
>> Both core_power_v1 and core_power_v4 functions require core_clks_enable
>> function during POWER_ON. Therefore, in the core_clks_enable function,
>> if calling dev_pm_opp_find_freq_ceil to obtain the frequency fails,
>> it needs to fall back to the freq_tbl to retrieve the frequency.
>>
>> Signed-off-by: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
>> ---
>> Since device trees for both HFI_VERSION_1XX and HFI_VERSION_3XX do not
>> contain an opp-table and have not configured opp-pmdomain, they still
>> need to use the frequencies defined in the driver's freq_tbl.
>>
>> Therefore, if calling dev_pm_opp_find_freq_ceil to obtain the frequency
>> fails in the core_clks_enable, it needs to fall back to the freq_tbl to
>> retrieve the frequency.
>>
>> Validated this series on QCS615 and msm8916.
>> ---
>
> This is not a proper fix, the logic you added in core_get_v4() should
> be moved to a common handler
Well, it is a proper fix in the sense that it makes things work, but
you're expanding the delta between the power handling across generations,
even though it's almost the same.. I submitted a series to clean it up
once, but it didn't go anywhere
https://lore.kernel.org/linux-arm-msm/20230911-topic-mars-v3-0-79f23b81c261@xxxxxxxxxx/
Konrad