From: Abel Vesa <abel.vesa@linaro.org>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Kevin Hilman <khilman@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>, avel Machek <pavel@ucw.cz>,
Len Brown <len.brown@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bjorn Andersson <andersson@kernel.org>,
Andy Gross <agross@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Mike Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Taniya Das <tdas@qti.qualcomm.com>
Cc: linux-pm@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-msm@vger.kernel.org
Subject: [PATCH 0/2] PM: domains: Add control for switching back and forth to HW control
Date: Wed, 28 Jun 2023 13:56:50 +0300 [thread overview]
Message-ID: <20230628105652.1670316-1-abel.vesa@linaro.org> (raw)
This is just a resend of [1]. This resend just adds the back story behind
the need for such a generic API as a cover letter. Also added my SoB tag
to Ulf's patch.
Some of the newer Qualcomm platforms support handing of the control of
some of the GDSCs (implemented as power domains in Linux) to some device
firmware. The idea behind such approach is that the firmware knows best
when such a power domain can be powered off or not and leads most of the
time to better power consumption.
At this point, if such GDSC provides HW control support, the current
implementation is switching to HW control right after the GDSC gets
powered on and it is left in HW control mode until right before the
request for power off is done. This needs to remain as is for now, as we
do not know for sure what each firmware expects from its related GDSCs.
For example, the venus driver expects the codec GDSCs to remain always
in HW control mode, otherwise the firmware would crush.
But in some cases, the consumer driver needs to switch back and forth.
And the explanation for such case is when a driver needs to interract
with the device (e.g. reading status bits) and the firmware doesn't
guarantee the GDSC will be enabled when in HW mode. Therefore, the
consumer would need to switch back to SW mode, do its thing, and then
switch again back to HW mode.
This is where the patch from Ulf comes in. It allows consumers that
actually need to control the HW/SW mode to do so.
The GDSC patch just implemets the set_hwmode op and sets it for each
GDSC that provides HW control mode.
[1] https://lore.kernel.org/all/20230627104033.3345659-1-abel.vesa@linaro.org/
Abel Vesa (1):
clk: qcom: gdsc: Add support for set_hwmode_dev
Ulf Hansson (1):
PM: domains: Allow devices attached to genpd to be managed by HW
drivers/base/power/domain.c | 66 +++++++++++++++++++++++++++++++++++++
drivers/clk/qcom/gdsc.c | 22 +++++++++++++
include/linux/pm_domain.h | 15 +++++++++
3 files changed, 103 insertions(+)
--
2.34.1
next reply other threads:[~2023-06-28 10:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 10:56 Abel Vesa [this message]
2023-06-28 10:56 ` [PATCH 1/2] PM: domains: Allow devices attached to genpd to be managed by HW Abel Vesa
2023-06-28 10:56 ` [PATCH 2/2] clk: qcom: gdsc: Add support for set_hwmode_dev Abel Vesa
2023-06-28 17:18 ` Konrad Dybcio
2023-07-10 4:10 ` Taniya Das
2023-07-17 11:08 ` Abel Vesa
2023-07-10 4:11 ` Taniya Das
2023-06-28 17:15 ` [PATCH 0/2] PM: domains: Add control for switching back and forth to HW control Rafael J. Wysocki
2023-06-28 21:55 ` Ulf Hansson
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=20230628105652.1670316-1-abel.vesa@linaro.org \
--to=abel.vesa@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=len.brown@intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=tdas@qti.qualcomm.com \
--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