From: Herbert Xu <herbert@gondor.apana.org.au>
To: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Udit Tiwari <udit.tiwari@oss.qualcomm.com>,
Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Subject: Re: [Patch v9] crypto: qce - Add runtime PM and interconnect bandwidth scaling support
Date: Mon, 10 Aug 2026 18:27:43 +1000 [thread overview]
Message-ID: <anmLfyaF1vUNDqNe@gondor.apana.org.au> (raw)
In-Reply-To: <20260729110455.641256-1-kuldeep.singh@oss.qualcomm.com>
On Wed, Jul 29, 2026 at 04:34:55PM +0530, Kuldeep Singh wrote:
> From: Udit Tiwari <udit.tiwari@oss.qualcomm.com>
>
> 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 <udit.tiwari@oss.qualcomm.com>
> Tested-by: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
> Signed-off-by: Kuldeep Singh <kuldeep.singh@oss.qualcomm.com>
> ---
> I am taking care of follow-up of this patch from the original author,
> with their consent, while preserving the original authorship.
>
> Changes in v9:
> - Rebase to latest linux-next/master(tag: next-20260728).
> - Link to v8:
> https://lore.kernel.org/linux-arm-msm/20260517105233.807935-1-udit.tiwari@oss.qualcomm.com/
>
> 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/20260220072818.2921517-1-quic_utiwari@quicinc.com/
>
> Changes in v7:
> - Use ACQUIRE guard in probe to simplify runtime PM management and error
> paths.
> - Drop redundant icc_enable() call in runtime resume path.
> - Explicitly call pm_clk_suspend(dev) and pm_clk_resume(dev) within the
> custom runtime PM callbacks. Since custom callbacks are provided to
> handle interconnect scaling, the standard PM clock helpers must be
> invoked manually to ensure clocks are gated/ungated.
> - Link to v6:
> https://lore.kernel.org/lkml/20260210061437.2293654-1-quic_utiwari@quicinc.com/
>
> Changes in v6:
> - Adopt ACQUIRE(pm_runtime_active_try, ...) for scoped runtime PM
> management in qce_handle_queue(). This removes the need for manual
> put calls and goto labels in the error paths, as suggested by Konrad.
> - Link to v5:
> https://lore.kernel.org/lkml/20251120062443.2016084-1-quic_utiwari@quicinc.com/
>
> Changes in v5:
> - Drop Reported-by and Closes tags for kernel test robot W=1 warnings,
> as the issue was fixed within the same patch series.
> - Fix a minor comment indentation/style issue.
> - Link to v4:
> https://lore.kernel.org/lkml/20251117062737.3946074-1-quic_utiwari@quicinc.com/
>
> Changes in v4:
> - Annotate runtime PM callbacks with __maybe_unused to silence W=1
> warnings.
> - Add Reported-by and Closes tags for kernel test robot warning.
> - Link to v3:
> https://lore.kernel.org/lkml/20251115084851.2750446-1-quic_utiwari@quicinc.com/
>
> Changes in v3:
> - Switch from manual clock management to PM clock helpers
> (devm_pm_clk_create() + pm_clk_add()); no direct clk_* enable/disable
> in runtime callbacks.
> - Replace pm_runtime_get_sync() with pm_runtime_resume_and_get(); remove
> pm_runtime_put_noidle() on error.
> - Define PM ops using helper macros and reuse runtime callbacks for
> system sleep via pm_runtime_force_suspend()/pm_runtime_force_resume().
> - Link to v2:
> https://lore.kernel.org/lkml/20250826110917.3383061-1-quic_utiwari@quicinc.com/
>
> Changes in v2:
> - Extend suspend/resume support to include runtime PM and ICC scaling.
> - Register dev_pm_ops and implement runtime_suspend/resume callbacks.
> - Link to v1:
> https://lore.kernel.org/lkml/20250606105808.2119280-1-quic_utiwari@quicinc.com/
> ---
> drivers/crypto/qce/core.c | 99 ++++++++++++++++++++++++++++++++++++---
> 1 file changed, 92 insertions(+), 7 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2026-08-10 8:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 11:04 [Patch v9] crypto: qce - Add runtime PM and interconnect bandwidth scaling support Kuldeep Singh
2026-07-31 8:38 ` Bartosz Golaszewski
2026-08-10 8:27 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anmLfyaF1vUNDqNe@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=brgl@kernel.org \
--cc=davem@davemloft.net \
--cc=kuldeep.singh@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.patil@oss.qualcomm.com \
--cc=udit.tiwari@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.