mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [RFC PATCH 2/3] PM / Domains: Add support for devices with multiple domains
Date: Fri, 30 Sep 2016 09:05:21 +0100	[thread overview]
Message-ID: <f62f7b1c-0df5-1850-ecf7-b6e963520248@nvidia.com> (raw)
In-Reply-To: <CAMuHMdWUAQd-sbj51XRPJ5b9By8Aiak6h-F=BcMCR=i8MiZvbQ@mail.gmail.com>

Hi PM posse!

On 23/09/16 15:27, Geert Uytterhoeven wrote:
> Hi Jon,
> 
> On Fri, Sep 23, 2016 at 2:57 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
>> On 21/09/16 15:57, Geert Uytterhoeven wrote:
>>> On Wed, Sep 21, 2016 at 4:37 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
>>>> On 21/09/16 09:53, Geert Uytterhoeven wrote:
>>>>> On Tue, Sep 20, 2016 at 12:28 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
>>>>>> Some devices may require more than one PM domain to operate and this is
>>>>>> not currently by the PM domain framework. Furthermore, the current Linux
>>>>>> 'device' structure only allows devices to be associated with a single PM
>>>>>> domain and so cannot easily be associated with more than one. To allow
>>>>>> devices to be associated with more than one PM domain, if multiple
>>>>>> domains are defined for a given device (eg. via device-tree), then:
>>>>>> 1. Create a new PM domain for this device. The name of the new PM domain
>>>>>>    created matches the device name for which it was created for.
>>>>>> 2. Register the new PM domain as a sub-domain for all PM domains
>>>>>>    required by the device.
>>>>>> 3. Attach the device to the new PM domain.
>>>>>
>>>>> This looks a suboptimal to me: if you have n devices sharing the same PM
>>>>> domains, you would add n new subdomains?
>>>>
>>>> BTW, would this be the case today for some renesas devices or are you
>>>> just pointing this out as something that could be optimised/improved?
>>>
>>> This is the case for all Renesas SoCs that have power areas: devices belong
>>> to both the PM domain for the power area, and to the PM domain for the clock
>>> domain.
>>
>> To quantify this a bit, for the Renesas case, how many of these
>> duplicated domains would there be if you were to use this approach as-is?
> 
> for i in $(git grep -l renesas, -- "*dts*") ; do echo --- $i ---; git
> grep -w power-domains $i | sort | uniq -c | sort -n;done
> 
> tells you how many (supported) devices are (currently) present in each
> PM domain.
> Most of these (all but devices in CPU/SCU power areas) are also part of a
> clock domain.
> The synthetic R8A779*_PD_ALWAYS_ON domains could be dropped again,
> as we could just refer to the CPG/MSSR node for the clock domain instead.
> 
> For older SH/R-Mobile SoCs with lots of hierarchical domains, that gives us,
> after removing the above:
> 
>       1 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_a4mp>;
>       1 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_d4>;
>       2 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_c5>;
>       3 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_a4r>;
>       6 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_a4s>;
>      15 arch/arm/boot/dts/r8a7740.dtsi:         power-domains = <&pd_a3sp>;
> 
> R-Car Gen1/Gen2 have all devices in the "always on" PM domain, so they're
> not affected.
> 
> R-Car Gen3 again has devices in power areas, mostly for graphics related
> purposes:
> 
>      16 arch/arm64/boot/dts/renesas/r8a7795.dtsi:
>  power-domains = <&sysc R8A7795_PD_A3VP>;

Does anyone have any more inputs comments on this? Does it look complete
bonkers or should I forge ahead with this?

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2016-09-30  8:05 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 10:28 [RFC PATCH 0/3] PM / Domains: Add support for devices that require " Jon Hunter
2016-09-20 10:28 ` [RFC PATCH 1/3] PM / Domains: Add helper functions for finding and attaching PM domains Jon Hunter
2016-09-20 10:28 ` [RFC PATCH 2/3] PM / Domains: Add support for devices with multiple domains Jon Hunter
2016-09-20 17:54   ` Jon Hunter
2016-09-21  8:53   ` Geert Uytterhoeven
2016-09-21 10:01     ` Jon Hunter
2016-09-21 14:37     ` Jon Hunter
2016-09-21 14:57       ` Geert Uytterhoeven
2016-09-23 12:57         ` Jon Hunter
2016-09-23 14:27           ` Geert Uytterhoeven
2016-09-30  8:05             ` Jon Hunter [this message]
2016-10-07  9:14   ` Kevin Hilman
2016-10-10 11:24     ` Jon Hunter
2016-09-20 10:28 ` [RFC PATCH 3/3] dt-bindings: Add support for devices with multiple PM domains Jon Hunter
2016-10-06  6:04 ` [RFC PATCH 0/3] PM / Domains: Add support for devices that require multiple domains Rajendra Nayak
2016-10-06  8:25   ` Jon Hunter
2016-10-06  8:43     ` Rajendra Nayak
2016-10-31 10:44       ` Jon Hunter
2016-11-02  8:56         ` Rajendra Nayak
2016-11-16 13:11           ` Ulf Hansson
2016-11-17  2:31             ` Rajendra Nayak
2016-11-17 15:39               ` Stanimir Varbanov
2016-11-22 13:05                 ` Ulf Hansson
2016-11-23  3:48                   ` Rajendra Nayak
2016-10-06 12:22 ` Ulf Hansson
2016-10-10 11:18   ` Jon Hunter
2016-10-10 14:04     ` Ulf Hansson
2016-10-11  9:15       ` Jon Hunter
2016-11-03 14:20         ` Jon Hunter
2016-11-16 10:48           ` Jon Hunter
2016-11-16 12:53             ` Rafael J. Wysocki
2016-11-22 11:12               ` Jon Hunter
2016-11-22 13:31                 ` Ulf Hansson
2016-11-22 14:28                   ` Jon Hunter
2016-11-22 18:26                 ` Kevin Hilman
2016-11-22 18:41                   ` Jon Hunter
2016-11-24  2:30                     ` Stephen Boyd
2016-11-29 11:33                       ` Marek Szyprowski
2016-12-15 11:38                         ` Jon Hunter
2016-11-22 21:55                   ` Rafael J. Wysocki
2016-11-23  9:29                     ` Jon Hunter
2016-11-23 13:15                       ` Rafael J. Wysocki
2017-02-28 15:18 ` Jon Hunter
2017-02-28 15:29   ` Geert Uytterhoeven
2017-03-13  9:37     ` Jon Hunter
2017-03-13 11:45       ` Ulf Hansson
2017-03-13 14:09         ` Jon Hunter
2017-03-13 14:19           ` Geert Uytterhoeven
2017-03-13 14:27             ` Jon Hunter
2017-03-13 14:38               ` Geert Uytterhoeven
2017-03-13 14:51                 ` Jon Hunter
2017-03-13 14:42           ` Ulf Hansson
2017-03-15  8:57             ` Jon Hunter
2017-03-15  3:47           ` Nayak, Rajendra
2017-03-15  9:03             ` Jon Hunter
2017-03-01  6:19   ` Rajendra Nayak

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=f62f7b1c-0df5-1850-ecf7-b6e963520248@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=geert@linux-m68k.org \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --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®