Re: [PATCH v8] crypto: qce - Add runtime PM and interconnect bandwidth scaling support
Pankaj Patil <[email protected]>
| Newsgroups | org.kernel.vger.linux-crypto,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 5/17/2026 4:22 PM, Udit Tiwari wrote: > The Qualcomm Crypto Engine (QCE) driver currently lacks support for > runtime power management (PM) and interconnect bandwidth control. > As a result, the hardware remains fully powered and clocks stay > enabled even when the device is idle. Additionally, static > interconnect bandwidth votes are held indefinitely, preventing the > system from reclaiming unused bandwidth. > > Address this by enabling runtime PM and dynamic interconnect > bandwidth scaling to allow the system to suspend the device when idle > and scale interconnect usage based on actual demand. Improve overall > system efficiency by reducing power usage and optimizing interconnect > resource allocation. > > Signed-off-by: Udit Tiwari <[email protected]> > --- Checked interconnect vote summary while triggering s2idle and resume Tested-by: Pankaj Patil <[email protected]> > Tested: > > - Verify that ICC votes drop to zero after probe and upon request > completion. > - Confirm that runtime PM usage count increments during active > requests and decrements afterward. > - Observe that the device correctly enters the suspended state when > idle. > > Changes in v8: > - Drop pm_clk framework (devm_pm_clk_create/pm_clk_add/pm_clk_suspend/ > pm_clk_resume); use devm_clk_get_optional() and direct > clk_prepare_enable()/clk_disable_unprepare() in runtime PM callbacks. > This removes the CONFIG_PM_CLK dependency and the build error reported > by the kernel test robot. > - Replace icc_disable() with icc_set_bw(path, 0, 0) in runtime suspend > to avoid corrupting the internal 'enabled' flag, which would cause > subsequent icc_set_bw() calls in resume to be silently skipped during > aggregation. > - Fix ICC vote ordering: cast bandwidth vote before enabling clocks in > resume; disable clocks before dropping ICC vote in suspend. > - Use PM_RUNTIME_ACQUIRE_AUTOSUSPEND()/PM_RUNTIME_ACQUIRE_ERR() wrapper > macros instead of raw ACQUIRE() in both qce_handle_queue() and probe. > - Drop __maybe_unused from runtime PM callbacks; use RUNTIME_PM_OPS / > SYSTEM_SLEEP_PM_OPS (non-SET_ prefix) and pm_ptr(&qce_crypto_pm_ops). > - Drop unnecessary ret = 0 initializations in qce_handle_queue() and > qce_runtime_resume(). > - Extend probe comment to explain ICC + clock ordering rationale. > - Link to v7: > https://lore.kernel.org/lkml/[email protected]/ [...]