linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: PM regression with commit 5de85b9d57ab PM runtime re-init in v4.5-rc1
Date: Wed, 3 Feb 2016 08:27:06 -0800	[thread overview]
Message-ID: <20160203162705.GG19432@atomide.com> (raw)
In-Reply-To: <CAPDyKFqLi8xOUeoxUTAmif5QrOjVpV_2CDLv4hjO_C9iOnv+5Q@mail.gmail.com>

* Ulf Hansson <ulf.hansson@linaro.org> [160203 02:24]:
> On 3 February 2016 at 00:41, Tony Lindgren <tony@atomide.com> wrote:
>
> > Well we actually pretty much have devices in that state to start
> > with.
> 
> That's not true, not even for omap.
> 
> There are definitely devices which HW state is reflected by RPM_ACTIVE
> at boot. It's the responsible of the subsystem/driver (including PM
> domains) to make sure the runtime PM status is updated accordingly, to
> reflect the real HW state.
> 
> For omap hwmod, at device registration in omap_device_build_from_dt()
> it may actually invoke pm_runtime_set_active() if the device is
> enabled. To my understanding, that's done to synchronize the real HW
> state with the runtime PM status, right?

Sure we do have cases where the bootloader state needs to be
preserved for some devices. Like GPIO pin state to power memory on
some devices! :)

> >> To me, it's the responsible of the PM domain to *help* with the
> >> synchronization, not prevent it as it currently does.
> >
> > The problem is that the hardware state gets out of sync with
> > PM runtime. And that's going to be a pain to debug later on.
> 
> I don't see the problem, but of course you know omap for better than I do.

Well there's also the long term maintenance aspect at least I
need to consider.

> So if you are concerned about this, perhaps adding a dev_dbg print
> when the omap hwmod's ->runtime_suspend() callback returns zero could
> be a way forward?

If we downgrade it to a debug statement or a warning, we'll soon end
up with even more driver specific warnings than we already have.
And I don't want to be chasing people around to fix their drivers
for eavery new driver that gets submitted.

Also, without this error I would not even originally have noticed we
have a problem :) So I suggest the following:

1. I'll do a series of patches to fix up the handful of omap
   specific drivers with pm_runtime_use_autosuspend() that depend
   on omap_device

2. I'll also do a patch to improve the omap_device error message
   so new drivers are easy to fix. Something like:

  "%() called from invalid state %d, use pm_runtime_put_sync_suspend()?"

Does that sounds OK to you?

Regards,

Tony

  parent reply	other threads:[~2016-02-03 16:27 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-26 22:48 PM regression with commit 5de85b9d57ab PM runtime re-init in v4.5-rc1 Tony Lindgren
2016-01-26 22:50 ` Tony Lindgren
2016-01-26 23:14 ` Rafael J. Wysocki
2016-01-26 23:22   ` Tony Lindgren
2016-01-26 23:37     ` Rafael J. Wysocki
2016-01-26 23:52       ` Tony Lindgren
2016-01-27  7:54         ` Rafael J. Wysocki
2016-01-27  8:17           ` Ulf Hansson
2016-01-27 15:19             ` Tony Lindgren
2016-01-27 22:51             ` Rafael J. Wysocki
2016-01-28 14:29         ` Ulf Hansson
2016-01-28 16:58           ` Tony Lindgren
2016-02-01 16:44             ` Ulf Hansson
2016-02-01 18:11               ` Tony Lindgren
2016-02-01 22:06                 ` Tony Lindgren
2016-02-01 22:17                   ` Rafael J. Wysocki
2016-02-01 22:29                     ` Tony Lindgren
2016-02-01 23:10                       ` Rafael J. Wysocki
2016-02-01 23:28                         ` Tony Lindgren
2016-02-01 23:44                           ` Tony Lindgren
2016-02-01 23:49                           ` Alan Stern
2016-02-02  3:05                             ` Tony Lindgren
2016-02-02 10:07                               ` Ulf Hansson
2016-02-02 10:42                                 ` Ulf Hansson
2016-02-02 16:23                                   ` Alan Stern
2016-02-02 16:35                                   ` Tony Lindgren
2016-02-02 20:47                                     ` Ulf Hansson
2016-02-02 23:41                                       ` Tony Lindgren
2016-02-03 10:23                                         ` Ulf Hansson
2016-02-03 10:25                                           ` Ulf Hansson
2016-02-03 12:18                                             ` Rafael J. Wysocki
2016-02-03 14:58                                               ` Ulf Hansson
2016-02-03 15:45                                                 ` Alan Stern
2016-02-03 16:09                                                   ` Tony Lindgren
2016-02-03 16:24                                                     ` Ulf Hansson
2016-02-03 17:01                                                       ` Tony Lindgren
2016-02-03 17:16                                                       ` Rafael J. Wysocki
2016-02-03 16:27                                           ` Tony Lindgren [this message]
2016-02-03 18:02                                             ` Ulf Hansson
2016-02-03 18:28                                               ` Tony Lindgren
2016-02-03 18:37                                                 ` Ulf Hansson
2016-02-03 18:45                                                   ` Tony Lindgren
2016-02-03 21:51                                                     ` Tony Lindgren
2016-02-02 16:15                                 ` Alan Stern
2016-02-02 16:49                                   ` Tony Lindgren
2016-02-02 18:05                                     ` Tony Lindgren
2016-02-02 18:43                                       ` Alan Stern
2016-02-02 18:54                                         ` Tony Lindgren
2016-02-02 19:16                                           ` Alan Stern
2016-02-02 21:03                                             ` Tony Lindgren
2016-02-02 21:45                                               ` Alan Stern
2016-02-02 23:46                                                 ` Tony Lindgren
2016-02-03 13:06                                                   ` Rafael J. Wysocki
2016-02-03 16:36                                                     ` Tony Lindgren
2016-02-03 15:48                                                   ` Alan Stern
2016-02-03 16:37                                                     ` Tony Lindgren
2016-02-03 17:18                                                   ` Rafael J. Wysocki
2016-02-03 17:22                                                     ` Tony Lindgren
2016-02-03 17:27                                                       ` Rafael J. Wysocki
2016-02-04 10:20                                                     ` Ulf Hansson
2016-02-04 16:04                                                       ` Alan Stern
2016-02-04 17:20                                                         ` Tony Lindgren
2016-02-04 21:11                                                         ` Ulf Hansson
2016-02-04 22:09                                                           ` Alan Stern
2016-02-04 22:34                                                             ` Ulf Hansson
2016-02-05  1:08                                                               ` Tony Lindgren
2016-02-05  6:54                                                                 ` Ulf Hansson
2016-02-05 19:10                                                                   ` Tony Lindgren
2016-02-02 18:47                                       ` Tony Lindgren
2016-02-02 20:24                                   ` Ulf Hansson
2016-02-02 21:24                                     ` Alan Stern
2016-02-02 21:39                                     ` Tony Lindgren
2016-02-03 13:03                                       ` Rafael J. Wysocki
2016-02-03 16:49                                         ` Tony Lindgren

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=20160203162705.GG19432@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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).