From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Viresh Kumar <vireshk@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v7 01/37] soc/tegra: pmc: Temporarily disable PMC state syncing
Date: Thu, 12 Aug 2021 19:02:09 +0300 [thread overview]
Message-ID: <9a2fc1f7-5c10-eac3-97ad-303bc86c0666@gmail.com> (raw)
In-Reply-To: <20210701232728.23591-2-digetx@gmail.com>
02.07.2021 02:26, Dmitry Osipenko пишет:
> Disable PMC state syncing in order to ensure that we won't break older
> kernels once device-trees will be updated with the addition of the power
> domains. Previously this was unnecessary because the plan was to make clk
> device that will attach to the domain for each clock, but the plan changed
> and now we're going make a better GENPD implementation that will require
> to update each device driver with the runtime PM and OPP support before
> we could safely enable the state syncing.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
> drivers/soc/tegra/pmc.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
> index ea62f84d1c8b..f63dfb2ca3f9 100644
> --- a/drivers/soc/tegra/pmc.c
> +++ b/drivers/soc/tegra/pmc.c
> @@ -360,6 +360,7 @@ struct tegra_pmc_soc {
> unsigned int num_pmc_clks;
> bool has_blink_output;
> bool has_usb_sleepwalk;
> + bool supports_core_domain;
> };
>
> /**
> @@ -3029,6 +3030,7 @@ static void tegra20_pmc_setup_irq_polarity(struct tegra_pmc *pmc,
> }
>
> static const struct tegra_pmc_soc tegra20_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = ARRAY_SIZE(tegra20_powergates),
> .powergates = tegra20_powergates,
> .num_cpu_powergates = 0,
> @@ -3089,6 +3091,7 @@ static const char * const tegra30_reset_sources[] = {
> };
>
> static const struct tegra_pmc_soc tegra30_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = ARRAY_SIZE(tegra30_powergates),
> .powergates = tegra30_powergates,
> .num_cpu_powergates = ARRAY_SIZE(tegra30_cpu_powergates),
> @@ -3145,6 +3148,7 @@ static const u8 tegra114_cpu_powergates[] = {
> };
>
> static const struct tegra_pmc_soc tegra114_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = ARRAY_SIZE(tegra114_powergates),
> .powergates = tegra114_powergates,
> .num_cpu_powergates = ARRAY_SIZE(tegra114_cpu_powergates),
> @@ -3261,6 +3265,7 @@ static const struct pinctrl_pin_desc tegra124_pin_descs[] = {
> };
>
> static const struct tegra_pmc_soc tegra124_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = ARRAY_SIZE(tegra124_powergates),
> .powergates = tegra124_powergates,
> .num_cpu_powergates = ARRAY_SIZE(tegra124_cpu_powergates),
> @@ -3386,6 +3391,7 @@ static const struct tegra_wake_event tegra210_wake_events[] = {
> };
>
> static const struct tegra_pmc_soc tegra210_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = ARRAY_SIZE(tegra210_powergates),
> .powergates = tegra210_powergates,
> .num_cpu_powergates = ARRAY_SIZE(tegra210_cpu_powergates),
> @@ -3543,6 +3549,7 @@ static const struct tegra_wake_event tegra186_wake_events[] = {
> };
>
> static const struct tegra_pmc_soc tegra186_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = 0,
> .powergates = NULL,
> .num_cpu_powergates = 0,
> @@ -3677,6 +3684,7 @@ static const struct tegra_wake_event tegra194_wake_events[] = {
> };
>
> static const struct tegra_pmc_soc tegra194_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = 0,
> .powergates = NULL,
> .num_cpu_powergates = 0,
> @@ -3745,6 +3753,7 @@ static const char * const tegra234_reset_sources[] = {
> };
>
> static const struct tegra_pmc_soc tegra234_pmc_soc = {
> + .supports_core_domain = false,
> .num_powergates = 0,
> .powergates = NULL,
> .num_cpu_powergates = 0,
> @@ -3791,6 +3800,14 @@ static void tegra_pmc_sync_state(struct device *dev)
> {
> int err;
>
> + /*
> + * Newer device-trees have power domains, but we need to prepare all
> + * device drivers with runtime PM and OPP support first, otherwise
> + * state syncing is unsafe.
> + */
> + if (!pmc->soc->supports_core_domain)
> + return;
> +
> /*
> * Older device-trees don't have core PD, and thus, there are
> * no dependencies that will block the state syncing. We shouldn't
>
Thierry, could you please take this patch for 5.15? It should ease
further applying of the rest of the patches, thanks.
next prev parent reply other threads:[~2021-08-12 16:02 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 23:26 [PATCH v7 00/37] NVIDIA Tegra power management patches for 5.15 Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 01/37] soc/tegra: pmc: Temporarily disable PMC state syncing Dmitry Osipenko
2021-08-12 16:02 ` Dmitry Osipenko [this message]
2021-07-01 23:26 ` [PATCH v7 02/37] soc/tegra: pmc: Implement attach_dev() of power domain drivers Dmitry Osipenko
2021-08-02 14:48 ` Ulf Hansson
2021-08-02 18:23 ` Dmitry Osipenko
2021-08-04 9:59 ` Ulf Hansson
2021-08-04 21:16 ` Dmitry Osipenko
2021-08-09 14:15 ` Ulf Hansson
2021-08-09 23:56 ` Dmitry Osipenko
2021-08-10 10:51 ` Ulf Hansson
2021-08-11 19:30 ` Dmitry Osipenko
2021-08-11 22:41 ` Dmitry Osipenko
2021-08-12 1:40 ` Dmitry Osipenko
2021-08-12 11:17 ` Ulf Hansson
2021-08-12 16:24 ` Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 03/37] soc/tegra: Don't print error message when OPPs not available Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 04/37] soc/tegra: Add devm_tegra_core_dev_init_opp_table_simple() Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 05/37] dt-bindings: clock: tegra-car: Document new tegra-clocks node Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 06/37] clk: tegra: Support runtime PM and power domain Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 07/37] dt-bindings: host1x: Document OPP and power domain properties Dmitry Osipenko
2021-07-01 23:26 ` [PATCH v7 08/37] dt-bindings: host1x: Document Memory Client resets of Host1x, GR2D and GR3D Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 09/37] gpu: host1x: Add host1x_channel_stop() Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 10/37] gpu: host1x: Add runtime PM support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 11/37] gpu: host1x: Add stub driver for MPE, VI, EPP and ISP Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 12/37] drm/tegra: dc: Support OPP and SoC core voltage scaling Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 13/37] drm/tegra: hdmi: Add OPP support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 14/37] drm/tegra: gr2d: Support OPP and power management Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 15/37] drm/tegra: gr3d: " Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 16/37] drm/tegra: vic: Stop channel before suspending Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 17/37] usb: chipidea: tegra: Add runtime PM support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 18/37] bus: tegra-gmi: " Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 19/37] pwm: tegra: Add runtime PM and OPP support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 20/37] mmc: sdhci-tegra: " Dmitry Osipenko
2021-07-02 3:39 ` kernel test robot
2021-07-01 23:27 ` [PATCH v7 21/37] mtd: rawnand: tegra: Add runtime PM support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 22/37] soc/tegra: fuse: Clear fuse->clk on driver probe failure Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 23/37] soc/tegra: fuse: Add runtime PM support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 24/37] soc/tegra: fuse: Enable fuse clock on suspend Dmitry Osipenko
2021-07-21 16:00 ` Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 25/37] clk: tegra: Remove CLK_IS_CRITICAL flag from fuse clock Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 26/37] spi: tegra20-slink: Improve runtime PM usage Dmitry Osipenko
2021-07-02 8:29 ` kernel test robot
2021-07-01 23:27 ` [PATCH v7 27/37] spi: tegra20-slink: Add OPP support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 28/37] memory: tegra20-emc: Add minimal runtime PM support Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 29/37] memory: tegra30-emc: " Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 30/37] media: dt: bindings: tegra-vde: Convert to schema Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 31/37] media: dt: bindings: tegra-vde: Document OPP and power domain Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 32/37] media: staging: tegra-vde: Support generic " Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 33/37] ARM: tegra: Add OPP tables and power domains to Tegra20 device-trees Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 34/37] ARM: tegra: Add OPP tables and power domains to Tegra30 device-trees Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 35/37] ARM: tegra: Add Memory Client resets to Tegra20 GR2D, GR3D and Host1x Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 36/37] ARM: tegra: Add Memory Client resets to Tegra30 " Dmitry Osipenko
2021-07-01 23:27 ` [PATCH v7 37/37] soc/tegra: pmc: Enable core domain support on Tegra20 and Tegra30 Dmitry Osipenko
2021-07-09 13:01 ` [PATCH v7 00/37] NVIDIA Tegra power management patches for 5.15 Ulf Hansson
2021-07-09 21:23 ` Dmitry Osipenko
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=9a2fc1f7-5c10-eac3-97ad-303bc86c0666@gmail.com \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pdeschrijver@nvidia.com \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=vireshk@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;
as well as URLs for NNTP newsgroup(s).