mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	linux-pm@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend
Date: Wed, 27 Nov 2013 21:42:10 +0100	[thread overview]
Message-ID: <1619468.NHTb5ylADI@vostro.rjw.lan> (raw)
In-Reply-To: <1385566500-7666-1-git-send-email-ulf.hansson@linaro.org>

On Wednesday, November 27, 2013 04:34:55 PM Ulf Hansson wrote:
> To put devices into low power state during system suspend, it may be convenient
> for runtime PM supported subsystems, power domains and drivers to have the
> option of re-using the runtime PM callbacks.
> 
> At the moment, quite complex solutions exist for power domains that tries to
> handle the above, like for OMAP2. The idea here, is to make it possible for
> drivers, who should know best, how to easiest put their devices into low power
> state. The intent is thus not only to simplify drivers but also power domains.

So this is not entirely correct and stems from the fact that you are only
considering one platform.

On some other platforms, like x86 PC for one example, device drivers have no
idea how to put their devices into low power states at all, because that
depends on what's there in the ACPI tables.

This becomes clearly visible when you try to use the same driver on two
different platforms that have different board layouts and power configurations.
And if one of them uses ACPI by chance, the driver shouldn't really fiddle with
its little knobs for clocks and power rails directly.

> Additionally, some drivers seems to have messed up things when combining
> runtime PM with system PM. While we enable the option of re-using the runtime
> PM callbacks during system PM, we also intend to clarify the way forward for
> how these scenarios could be resolved.
> 
> Some new helper macros for defining PM callbacks and two new pm_generic*
> functions has been implemented in this patch set. These are provided to make it
> easier for those who wants to enable the option of re-using the runtime PM
> callbacks during system suspend.

I'm generally opposed to re-using callbacks like this, because it adds confusion
to the picture.  It may seem to be clever, but in fact it leads to bad design
choices in the drivers in my opinion.

Let's talk about specific examples, though.

Why exactly do you need what patch [5/5] does in the exynos_drm_fimc driver?

Rafael


  parent reply	other threads:[~2013-11-27 20:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 15:34 Ulf Hansson
2013-11-27 15:34 ` [PATCH 1/5] PM / Sleep: Add pm_generic functions to re-use runtime PM callbacks Ulf Hansson
2013-12-03 23:15   ` Rafael J. Wysocki
2013-12-03 23:41     ` Rafael J. Wysocki
2013-12-04 11:00       ` Ulf Hansson
2013-11-27 15:34 ` [PATCH 2/5] PM / Runtime: Implement the pm_generic_runtime functions for CONFIG_PM Ulf Hansson
2013-11-27 15:34 ` [PATCH 3/5] PM / Runtime: Add second macro for definition of runtime PM callbacks Ulf Hansson
2013-11-27 15:34 ` [PATCH 4/5] PM / Sleep: Add macro to define common late/early system " Ulf Hansson
2013-11-27 15:35 ` [PATCH 5/5] drm/exynos: Convert to suspend_late/resume_early callbacks for fimc Ulf Hansson
2013-11-27 20:42 ` Rafael J. Wysocki [this message]
2013-11-28  9:58   ` [PATCH 0/5] PM: Enable option of re-use runtime PM callbacks at system suspend Ulf Hansson
2013-11-28 21:16     ` Rafael J. Wysocki
2013-11-29  9:32       ` Ulf Hansson
2013-11-29  9:35         ` Ulf Hansson
2013-11-29 13:52         ` Rafael J. Wysocki
2013-11-29 14:02           ` Rafael J. Wysocki
2013-11-29 15:30             ` Alan Stern
2013-11-29 21:20               ` Rafael J. Wysocki
2013-12-02 15:50                 ` Ulf Hansson
2013-12-05 21:46                   ` Len Brown
2013-12-05 22:21                     ` Alan Stern
2013-12-06  0:53                       ` Pavel Machek
2013-12-02 15:21           ` 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=1619468.NHTb5ylADI@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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®