From: Bjorn Andersson <andersson@kernel.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
patches@lists.linux.dev, Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
linux-arm-msm@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Johan Hovold <johan+linaro@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Taniya Das <quic_tdas@quicinc.com>,
Satya Priya <quic_c_skakit@quicinc.com>,
Douglas Anderson <dianders@chromium.org>,
Matthias Kaehlcke <mka@chromium.org>
Subject: Re: [PATCH] clk: qcom: gdsc: Remove direct runtime PM calls
Date: Tue, 1 Nov 2022 21:49:27 -0500 [thread overview]
Message-ID: <20221102024927.n5mjyzyqyapveapa@builder.lan> (raw)
In-Reply-To: <20221101233421.997149-1-swboyd@chromium.org>
On Tue, Nov 01, 2022 at 04:34:21PM -0700, Stephen Boyd wrote:
> We shouldn't be calling runtime PM APIs from within the genpd
> enable/disable path for a couple reasons.
[..][
> Upon closer inspection, calling runtime PM APIs like this in the GDSC
> driver doesn't make sense. It was intended to make sure the GDSC for the
> clock controller providing other GDSCs was enabled, specifically the
> MMCX GDSC for the display clk controller on SM8250 (sm8250-dispcc), so
> that GDSC register accesses succeeded. That will already happen because
> we make the 'dev->pm_domain' a parent domain of each GDSC we register in
> gdsc_register() via pm_genpd_add_subdomain(). When any of these GDSCs
> are accessed, we'll enable the parent domain (in this specific case
> MMCX).
>
It's correct that adding the GDSCs as subdomains for the device's
parent-domain will ensure that enabling a GDSC will propagate up and
turn on the (typically) rpmhpd resource.
But the purpose for the explicit calls was to ensure that the clock
controller itself is accessible. It's been a while since I looked at
this, but iirc letting MMCX to turn off would cause the register access
during dispcc probing to fail - similar to how
clk_pm_runtime_get()/put() ensures the clock registers are accessible.
Perhaps I misunderstood something in the process, or lost track of the
actual issues?
Regards,
Bjorn
next prev parent reply other threads:[~2022-11-02 2:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-01 23:34 [PATCH] clk: qcom: gdsc: Remove direct runtime PM calls Stephen Boyd
2022-11-02 0:45 ` Doug Anderson
2022-11-02 3:16 ` Stephen Boyd
2022-11-14 20:11 ` Ulf Hansson
2022-11-02 2:49 ` Bjorn Andersson [this message]
2022-11-02 3:29 ` Stephen Boyd
2022-11-02 4:29 ` Bjorn Andersson
2022-11-02 18:08 ` Stephen Boyd
2022-11-02 10:52 ` Johan Hovold
2022-11-02 16:53 ` Stephen Boyd
2022-11-03 13:21 ` Johan Hovold
2022-11-03 18:19 ` Stephen Boyd
2022-11-04 10:53 ` Johan Hovold
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=20221102024927.n5mjyzyqyapveapa@builder.lan \
--to=andersson@kernel.org \
--cc=agross@kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=mturquette@baylibre.com \
--cc=patches@lists.linux.dev \
--cc=quic_c_skakit@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=sboyd@kernel.org \
--cc=swboyd@chromium.org \
--cc=ulf.hansson@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