From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Bryan O'Donoghue <bod@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
devicetree@vger.kernel.org, laurent.pinchart@ideasonboard.com,
kieran.bingham@ideasonboard.com
Subject: Re: [PATCH v2 02/14] media: qcom: camss: Add PM clock support and integrate with runtime PM
Date: Mon, 27 Apr 2026 16:04:49 +0200 [thread overview]
Message-ID: <c145efc2-9285-4e2f-a9e9-73c4faadf15e@oss.qualcomm.com> (raw)
In-Reply-To: <20260427-camss-isp-ope-v2-2-f430e7485009@oss.qualcomm.com>
On 4/27/26 2:43 PM, Loic Poulain wrote:
> Add optional PM clock support to the CAMSS driver using the PM clock
> framework. This allows CAMSS clocks to be registered once and
> automatically managed during runtime suspend and resume.
>
> This is especially useful for global CAMSS clocks that are shared across
> multiple CAMSS subnodes. Now that CAMSS is modeled as a simple-bus,
> these clocks are automatically enabled whenever a child node becomes
> active.
>
> This avoids the need for each subdevice to reference and manage the
> shared clocks individually. A typical example is the set of clocks in
> the top_group, which may be used by CSID, PHY, CCI, OPE, and other
> CAMSS blocks.
>
> Introduce a small PM clock descriptor table in the CAMSS resources
> structure to describe clocks and their optional rates. Initialize
> these clocks at probe time and delegate clock ownership to the PM
> core.
>
> Hook PM clock handling into the runtime PM callbacks to ensure clocks
> are properly suspended and resumed alongside power domains and ICC
> paths.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
[...]
> + for (i = 0; i < CAMSS_RES_MAX && camss->res->pm_clks[i].name; i++) {
> + const struct camss_pm_clk *entry = &camss->res->pm_clks[i];
> + struct clk *clk;
> +
> + clk = clk_get(dev, entry->name);
> + if (IS_ERR(clk)) {
> + dev_warn(dev, "failed to get pm_clk %s: %pe\n",
> + entry->name, clk);
> + continue;
> + }
> +
> + if (entry->rate) {
> + ret = clk_set_rate(clk, entry->rate);
> + if (ret)
> + dev_warn(dev, "failed to set rate for pm_clk %s: %d\n",
> + entry->name, ret);
> + }
So this makes a couple fragile assumptions:
* there's only one "on/operational" rate
* no OPP votes
I would imagine that in the camss-is-the-bus model, the top-level
device would house an OPP table.. but we have two somewhat independent
clocks that may possibly have separate RPMH requirements for their M/N
number of rates, which could result in M*N-long opp table
Konrad
next prev parent reply other threads:[~2026-04-27 14:04 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 12:43 [PATCH v2 00/14] media: qcom: camss: CAMSS Offline Processing Engine support Loic Poulain
2026-04-27 12:43 ` [PATCH v2 01/14] media: qcom: camss: Add support to populate sub-devices Loic Poulain
2026-04-28 6:43 ` Krzysztof Kozlowski
2026-04-28 11:41 ` Loic Poulain
2026-04-27 12:43 ` [PATCH v2 02/14] media: qcom: camss: Add PM clock support and integrate with runtime PM Loic Poulain
2026-04-27 14:04 ` Konrad Dybcio [this message]
2026-04-27 12:43 ` [PATCH v2 03/14] media: qcom: camss: Add PM clock definitions for QCM2290 Loic Poulain
2026-04-27 12:43 ` [PATCH v2 04/14] media: qcom: camss: Drop top_ahb/axi from QCM2290 subdevice clocks Loic Poulain
2026-04-27 12:43 ` [PATCH v2 05/14] media: qcom: camss: Add camss-isp-bufq helper Loic Poulain
2026-04-28 6:46 ` Krzysztof Kozlowski
2026-04-28 6:56 ` Bryan O'Donoghue
2026-04-28 11:29 ` Loic Poulain
2026-04-27 12:43 ` [PATCH v2 06/14] media: qcom: camss: Add camss-isp-sched helper Loic Poulain
2026-04-27 12:43 ` [PATCH v2 07/14] media: qcom: camss: Add camss-isp-pipeline helper Loic Poulain
2026-04-27 12:43 ` [PATCH v2 08/14] media: qcom-camss: Add image formats for Qualcomm CAMSS parameters buffer Loic Poulain
2026-04-27 12:43 ` [PATCH v2 09/14] media: qcom: camss: Add camss-isp-params helper Loic Poulain
2026-04-27 12:43 ` [PATCH v2 10/14] dt-bindings: media: qcom: Add CAMSS Offline Processing Engine (OPE) Loic Poulain
2026-04-27 14:22 ` Konrad Dybcio
2026-04-27 20:33 ` Loic Poulain
2026-04-28 10:15 ` Konrad Dybcio
2026-04-28 6:31 ` Krzysztof Kozlowski
2026-04-27 12:43 ` [PATCH v2 11/14] dt-bindings: media: qcom,qcm2290-camss: Add OPE ISP subnode Loic Poulain
2026-04-28 6:35 ` Krzysztof Kozlowski
2026-04-28 9:50 ` Konrad Dybcio
2026-04-28 9:54 ` Krzysztof Kozlowski
2026-04-27 12:43 ` [PATCH v2 12/14] media: uapi: Add CAMSS ISP configuration definition Loic Poulain
2026-04-27 12:56 ` Konrad Dybcio
2026-04-27 20:08 ` Loic Poulain
2026-04-27 20:25 ` Laurent Pinchart
2026-04-27 21:01 ` Loic Poulain
2026-04-27 21:57 ` Bryan O'Donoghue
2026-04-27 12:43 ` [PATCH v2 13/14] media: qcom: camss: Add CAMSS Offline Processing Engine driver Loic Poulain
2026-04-27 12:43 ` [PATCH v2 14/14] arm64: dts: qcom: agatti: Add OPE node Loic Poulain
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=c145efc2-9285-4e2f-a9e9-73c4faadf15e@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gustavoars@kernel.org \
--cc=kees@kernel.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=vladimir.zapolskiy@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox