Re: [PATCH v6 2/4] soc: qcom: ice: Add OPP-based clock scaling support for ICE
From: Abhinaba Rakshit <hidden>
Date: 2026-02-20 07:37:58
Also in:
linux-arm-msm, linux-crypto, linux-scsi, lkml
On Thu, Feb 19, 2026 at 03:16:33PM +0100, Konrad Dybcio wrote:
On 2/19/26 10:39 AM, Abhinaba Rakshit wrote:quoted
Register optional operation-points-v2 table for ICE device during device probe. Introduce clock scaling API qcom_ice_scale_clk which scale ICE core clock based on the target frequency provided and if a valid OPP-table is registered. Use flags (if provided) to decide on the rounding of the clock freq against OPP-table. Disable clock scaling if OPP-table is not registered. When an ICE-device specific OPP table is available, use the PM OPP framework to manage frequency scaling and maintain proper power-domain constraints. Also, ensure to drop the votes in suspend to prevent power/thermal retention. Subsequently restore the frequency in resume from core_clk_freq which stores the last ICE core clock operating frequency. Signed-off-by: Abhinaba Rakshit <redacted> ---[...]quoted
+int qcom_ice_scale_clk(struct qcom_ice *ice, unsigned long target_freq, + unsigned int flags)If you're not going to add more flags, 'bool round_ceil' would do just fine, without introducing new custom defines
I guess, the defines I am currently using are mutually exclusive and not intend to extend it. Hence, can replace using 'bool round_ceil'. Ack, will send a new patchset with the update.
[...]quoted
+ /* + * Register the OPP table only when ICE is described as a standalone + * device node. Older platforms place ICE inside the storage controller + * node, so they don't need an OPP table here, as they are handled in + * storage controller. + */ + if (!is_legacy_binding) { + /* OPP table is optional */ + err = devm_pm_opp_of_add_table(dev); + if (err && err != -ENODEV) { + dev_err(dev, "Invalid OPP table in Device tree\n"); + return ERR_PTR(err); + } + engine->has_opp = (err == 0); + + if (!engine->has_opp) + dev_info(dev, "ICE OPP table is not registered\n");dev_warn(dev, "ICE OPP table is not registered, please update your DT")
Ack, will send a new patchset with the update. Abhinaba Rakshit