mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	linux-tegra@vger.kernel.org, Linux PM <linux-pm@vger.kernel.org>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-clk@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH v1] clk: tegra: Adjust callbacks in tegra_clock_pm
Date: Tue, 6 Jan 2026 10:36:00 +0000	[thread overview]
Message-ID: <2d55ebec-1e42-4ddb-b0e2-529d3b2d7b85@nvidia.com> (raw)
In-Reply-To: <5088794.31r3eYUQgx@rafael.j.wysocki>

Hi Rafael,

On 04/01/2026 11:53, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> System suspend and resume callbacks run after the core has bumped
> up the runtime PM usage counters of all devices, so these callbacks
> need not worry about runtime PM reference counting.
> 
> Accordingly, to eliminate useless overhead related to runtime PM
> usage counter manipulation, set the suspend callback pointer in
> tegra_clock_pm to pm_runtime_resume() and do not set the resume
> callback in it at all.
> 
> This will also facilitate a planned change of the pm_runtime_put()
> return type to void in the future.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> This patch is requisite for converting pm_runtime_put() into a void
> function.
> 
> If you decide to pick it up, please let me know.
> 
> Otherwise, an ACK or equivalent will be appreciated, but also the lack
> of specific criticism will be eventually regarded as consent.
> 
> ---
>   drivers/clk/tegra/clk-device.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/clk/tegra/clk-device.c
> +++ b/drivers/clk/tegra/clk-device.c
> @@ -175,7 +175,7 @@ unreg_clk:
>    * perspective since voltage is kept at a nominal level during suspend anyways.
>    */
>   static const struct dev_pm_ops tegra_clock_pm = {
> -	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_resume_and_get, pm_runtime_put)
> +	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_resume, NULL)
>   };
>   
>   static const struct of_device_id tegra_clock_match[] = {


I gave this a quick test and this is causing a suspend regression on
Tegra20 and Tegra30 that use this driver. Looking at the console log
on Tegra20 I see the following errors ...

  tegra-clock tegra_clk_sclk: PM: dpm_run_callback(): pm_runtime_resume returns 1
  tegra-clock tegra_clk_sclk: PM: failed to suspend: error 1
  PM: Some devices failed to suspend, or early wake event detected

Jon

-- 
nvpublic


  reply	other threads:[~2026-01-06 10:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-04 11:53 Rafael J. Wysocki
2026-01-06 10:36 ` Jon Hunter [this message]
2026-01-06 12:07   ` Rafael J. Wysocki
2026-01-06 12:19     ` [PATCH v2] " Rafael J. Wysocki
2026-01-06 14:46       ` Jon Hunter
2026-01-16 19:06       ` Thierry Reding

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=2d55ebec-1e42-4ddb-b0e2-529d3b2d7b85@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=digetx@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=rafael@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.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

all inboxes | Powered by JetHome®