From: Jagadeesh Kona <quic_jkona@quicinc.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
"Michael Turquette" <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, "Rob Herring" <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: Ajit Pandey <quic_ajipan@quicinc.com>,
Imran Shaik <quic_imrashai@quicinc.com>,
Taniya Das <quic_tdas@quicinc.com>,
"Satya Priya Kakitapalli" <quic_skakitap@quicinc.com>,
<linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/5] clk: qcom: videocc: Add support to attach multiple power domains
Date: Mon, 24 Feb 2025 12:07:21 +0530 [thread overview]
Message-ID: <a06f1e5b-78fb-4f95-96bb-985a585d4706@quicinc.com> (raw)
In-Reply-To: <1d9b661e-0607-4567-b420-5444b643df99@oss.qualcomm.com>
On 2/22/2025 12:49 AM, Konrad Dybcio wrote:
> On 18.02.2025 4:46 PM, Bryan O'Donoghue wrote:
>> On 18/02/2025 14:26, Jagadeesh Kona wrote:
>>> During boot-up, the PLL configuration might be missed even after
>>> calling pll_configure() from the clock controller probe. This can
>>> happen because the PLL is connected to one or more rails that are
>>> turned off, and the current clock controller code cannot enable
>>> multiple rails during probe. Consequently, the PLL may be activated
>>> with suboptimal settings, causing functional issues.
>>>
>>> To properly configure the video PLLs in the probe on SM8450, SM8475,
>>> SM8550, and SM8650 platforms, the MXC rail must be ON along with MMCX.
>>> Therefore, add support to attach multiple power domains to videocc on
>>> these platforms.
>>>
>>> Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com>
>>> ---
>>> drivers/clk/qcom/videocc-sm8450.c | 4 ++++
>>> drivers/clk/qcom/videocc-sm8550.c | 4 ++++
>>> 2 files changed, 8 insertions(+)
>>>
>>> diff --git a/drivers/clk/qcom/videocc-sm8450.c b/drivers/clk/qcom/videocc-sm8450.c
>>> index f26c7eccb62e7eb8dbd022e2f01fa496eb570b3f..b50a14547336580de88a741f1d33b126e9daa848 100644
>>> --- a/drivers/clk/qcom/videocc-sm8450.c
>>> +++ b/drivers/clk/qcom/videocc-sm8450.c
>>> @@ -437,6 +437,10 @@ static int video_cc_sm8450_probe(struct platform_device *pdev)
>>> struct regmap *regmap;
>>> int ret;
>>> + ret = qcom_cc_attach_pds(&pdev->dev, &video_cc_sm8450_desc);
>>> + if (ret)
>>> + return ret;
>>> +
>>> ret = devm_pm_runtime_enable(&pdev->dev);
>>> if (ret)
>>> return ret;
>>> diff --git a/drivers/clk/qcom/videocc-sm8550.c b/drivers/clk/qcom/videocc-sm8550.c
>>> index 7c25a50cfa970dff55d701cb24bc3aa5924ca12d..d4b223d1392f0721afd1b582ed35d5061294079e 100644
>>> --- a/drivers/clk/qcom/videocc-sm8550.c
>>> +++ b/drivers/clk/qcom/videocc-sm8550.c
>>> @@ -542,6 +542,10 @@ static int video_cc_sm8550_probe(struct platform_device *pdev)
>>> int ret;
>>> u32 sleep_clk_offset = 0x8140;
>>> + ret = qcom_cc_attach_pds(&pdev->dev, &video_cc_sm8550_desc);
>>> + if (ret)
>>> + return ret;
>>> +
>>> ret = devm_pm_runtime_enable(&pdev->dev);
>>> if (ret)
>>> return ret;
>>>
>>
>> What's the difference between doing the attach here or doing it in really_probe() ?
>>
>> There doesn't seem to be any difference except that we will have an additional delay introduced.
>>
>> Are you describing a race condition ?
>>
>> I don't see _logic_ here to moving the call into the controller's higher level probe.
>>
>> Can you describe some more ?
>
> I think this is a sane course of action:
>
> 1. associate pll config with the pll (treewide change)
> 2. add a generic pll_configure call that parses the type
> 3. store PLLs to be configured in an array of dt-bindings indices
> 4. move PLL configuration to really_probe
> 5. move RPM enablement to really_probe, make it conditional to limit resource
> waste on e.g. gcc
> 6. move attaching GDSCs to really_probe
>
> Konrad
Thanks Konrad for your feedback and suggestion.
I will check and work on this approach of moving PLL configure and RPM enablement
to a common code.
Thanks,
Jagadeesh
next prev parent reply other threads:[~2025-02-24 6:37 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 14:26 [PATCH 0/5] clk: qcom: Add support to attach multiple power domains in cc probe Jagadeesh Kona
2025-02-18 14:26 ` [PATCH 1/5] dt-bindings: clock: qcom,sm8450-videocc: Add MXC power domain Jagadeesh Kona
2025-02-18 15:49 ` Bryan O'Donoghue
2025-02-21 20:54 ` Rob Herring (Arm)
2025-02-18 14:26 ` [PATCH 2/5] clk: qcom: common: Add support to attach multiple power domains Jagadeesh Kona
2025-02-18 14:26 ` [PATCH 3/5] clk: qcom: common: Attach clock power domains conditionally Jagadeesh Kona
2025-02-18 17:18 ` Dmitry Baryshkov
2025-02-19 11:36 ` Jagadeesh Kona
2025-02-19 11:57 ` Dmitry Baryshkov
2025-02-20 7:13 ` Jagadeesh Kona
2025-02-20 10:48 ` Dmitry Baryshkov
2025-02-21 11:42 ` Jagadeesh Kona
2025-02-21 13:35 ` Dmitry Baryshkov
2025-02-18 14:26 ` [PATCH 4/5] clk: qcom: videocc: Add support to attach multiple power domains Jagadeesh Kona
2025-02-18 15:46 ` Bryan O'Donoghue
2025-02-18 16:44 ` Bryan O'Donoghue
2025-02-18 17:19 ` Dmitry Baryshkov
2025-02-19 1:21 ` Bryan O'Donoghue
2025-02-19 11:41 ` Jagadeesh Kona
2025-02-19 11:59 ` Dmitry Baryshkov
2025-02-19 12:07 ` Bryan O'Donoghue
2025-02-20 7:15 ` Jagadeesh Kona
2025-02-20 10:21 ` Bryan O'Donoghue
2025-02-20 22:31 ` Bryan O'Donoghue
2025-02-20 22:34 ` Bryan O'Donoghue
2025-02-21 0:10 ` Dmitry Baryshkov
2025-02-21 9:42 ` Bryan O'Donoghue
2025-02-21 11:43 ` Jagadeesh Kona
2025-02-21 12:32 ` Bryan O'Donoghue
2025-02-24 6:37 ` Jagadeesh Kona
2025-02-19 11:38 ` Jagadeesh Kona
2025-02-19 12:02 ` Dmitry Baryshkov
2025-02-20 7:13 ` Jagadeesh Kona
2025-02-21 19:19 ` Konrad Dybcio
2025-02-24 6:37 ` Jagadeesh Kona [this message]
2025-02-18 14:26 ` [PATCH 5/5] arm64: dts: qcom: Add MXC power domain to videocc nodes Jagadeesh Kona
2025-02-18 15:41 ` Bryan O'Donoghue
2025-02-18 17:32 ` Dmitry Baryshkov
2025-02-20 7:08 ` Jagadeesh Kona
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=a06f1e5b-78fb-4f95-96bb-985a585d4706@quicinc.com \
--to=quic_jkona@quicinc.com \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_ajipan@quicinc.com \
--cc=quic_imrashai@quicinc.com \
--cc=quic_skakitap@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.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
all inboxes | Powered by JetHome®