From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Pawel Moll <pawel.moll@arm.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Rob Herring <robh+dt@kernel.org>,
Tomasz Figa <tomasz.figa@gmail.com>
Subject: Re: [PATCH 3/5] ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets
Date: Fri, 13 Feb 2015 13:29:25 +0000 [thread overview]
Message-ID: <20150213132924.GA27774@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAPDyKFoboE4iKyom86+EwHHTQAGpgKxGq969yrjQVpqizk-SLA@mail.gmail.com>
On Mon, Apr 28, 2014 at 01:55:40PM +0200, Ulf Hansson wrote:
> On 27 April 2014 15:29, Russell King <rmk+kernel@arm.linux.org.uk> wrote:
> > The PMU device contains an interrupt controller, power control and
> > resets. The interrupt controller is a little sub-standard in that
> > there is no race free way to clear down pending interrupts, so we try
> > to avoid problems by reducing the window as much as possible, and
> > clearing as infrequently as possible.
> >
> > The interrupt support is implemented using an IRQ domain, and the
> > parent interrupt referenced in the standard DT way.
> >
> > The power domains and reset support is closely related - there is a
> > defined sequence for powering down a domain which is tightly coupled
> > with asserting the reset. Hence, it makes sense to group these two
> > together.
> >
> > This patch adds the core PMU driver: power domains must be defined in
> > the DT file in order to make use of them. The reset controller can
> > be referenced in the standard way for reset controllers.
>
> Hi Russell,
>
> This patch would be simplified if this was based upon the not yet
> merged patchset from Tomasz Figa, "[PATCH v3 0/3] Generic Device Tree
> based power domain look-up".
>
> For example you would likely not need to add some of the marvel
> specific DT bindings, and you wouldn’t need the bus_notifiers to add
> devices to the power domain. I guess I just though it could be useful
> input to consider while going forward, unless you already knew.
In 3.19, I notice something of an odd behaviour.
My vMeta driver has runtime PM support enabled. When I explicitly register
the PM domain in the pmu driver via a bus notifier, I see:
root@cubox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain off
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspended
But when I disable that, and let the generic code do the registration,
I instead get:
root@cubox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
gpu-domain on
/devices/platform/vivante/etnaviv-gpu,2d active
vpu-domain on
/devices/platform/mbus/mbus:internal-regs/f1c00000.video-decoder suspended
The difference being that the vpu domain remains powered.
The only difference code-wise seems to be when genpd_dev_pm_attach() is
called. In the working case, it's before the device is considered for
probing. In the non-working case, it's just before the device is probed.
With debugging enabled in the PM domain code, with the former case I get:
Added domain provider from /mbus/internal-regs/power-management@d0000/vpu-domain
platform f1c00000.video-decoder: adding to PM domain vpu-domain
platform f1c00000.video-decoder: __pm_genpd_add_device()
With the latter non-working case:
Added domain provider from /mbus/internal-regs/power-management@d0000/vpu-domain
...
ap510-vmeta f1c00000.video-decoder: adding to PM domain vpu-domain
ap510-vmeta f1c00000.video-decoder: __pm_genpd_add_device()
vpu-domain: Power-on latency exceeded, new value 1578 ns
Neither of these debug messages provide much hint as to what the
difference is, or the cause of the PM domain code being de-sync'd
with its devices.
Maybe the PM code needs more debugging in it, and maybe the debugfs
file should always be present if debugfs support is enabled?
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-02-13 13:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 13:23 [PATCH RFC 0/5] Dove PMU support Russell King - ARM Linux
[not found] ` <20140427132312.GC26756-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2014-04-27 13:28 ` [PATCH 1/5] pm: domains: quieten down generic pm domains Russell King
2014-04-30 23:46 ` Rafael J. Wysocki
2014-05-02 9:24 ` Ulf Hansson
2014-05-04 22:36 ` Rafael J. Wysocki
[not found] ` <1412882.XTDX0QPJ6V-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2015-02-13 11:54 ` Russell King - ARM Linux
2014-04-27 13:28 ` [PATCH 2/5] pm: domains: avoid potential oops in pm_genpd_remove_device() Russell King
2014-04-30 23:46 ` Rafael J. Wysocki
2014-04-27 13:29 ` [PATCH 3/5] ARM: dove: create a proper PMU driver for power domains, PMU IRQs and resets Russell King
2014-04-28 11:55 ` Ulf Hansson
2014-04-28 12:17 ` Russell King - ARM Linux
2015-02-13 13:29 ` Russell King - ARM Linux [this message]
2015-02-13 14:11 ` Russell King - ARM Linux
2015-02-13 16:12 ` Russell King - ARM Linux
2014-04-27 13:29 ` [PATCH 4/5] ARM: dove: add Dove PMU DT entries to dove.dtsi Russell King
2014-04-27 13:29 ` [PATCH 5/5] ARM: dove: add non-DT PMU support Russell King
2014-04-28 7:47 ` [PATCH RFC 0/5] Dove " Sebastian Hesselbarth
[not found] ` <535E079B.6010701-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-04-28 8:31 ` Andrew Lunn
2014-04-29 9:15 ` Sebastian Hesselbarth
2014-06-15 15:25 ` Russell King - ARM Linux
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=20150213132924.GA27774@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tomasz.figa@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;
as well as URLs for NNTP newsgroup(s).