<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/power/domain.c, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-04-12T10:31:12Z</updated>
<entry>
<title>PM / domains: Don't skip driver's -&gt;suspend|resume_noirq() callbacks</title>
<updated>2018-04-12T10:31:12Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2018-01-10T20:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edde080c5e336112792c5e216bc0a45774700c58'/>
<id>urn:sha1:edde080c5e336112792c5e216bc0a45774700c58</id>
<content type='text'>
[ Upstream commit a935424bb658f9ca37eb5e94119b857998341356 ]

Commit 10da65423fdb (PM / Domains: Call driver's noirq callbacks)
started to respect driver's noirq callbacks, but while doing that it
also introduced a few potential problems.

More precisely, in genpd_finish_suspend() and genpd_resume_noirq()
the noirq callbacks at the driver level should be invoked, no matter
of whether dev-&gt;power.wakeup_path is set or not.

Additionally, the commit in question also made genpd_resume_noirq()
to ignore the return value from pm_runtime_force_resume().

Let's fix both these issues!

Fixes: 10da65423fdb (PM / Domains: Call driver's noirq callbacks)
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pm-qos'</title>
<updated>2017-11-13T00:33:48Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-11-13T00:33:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4762573b934cced83b91950f0e7a9f160e3983e3'/>
<id>urn:sha1:4762573b934cced83b91950f0e7a9f160e3983e3</id>
<content type='text'>
* pm-qos:
  PM / QoS: Fix device resume latency framework
  PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP
</content>
</entry>
<entry>
<title>PM / Domains: Fix genpd to deal with drivers returning 1 from -&gt;prepare()</title>
<updated>2017-11-08T11:16:57Z</updated>
<author>
<name>Ulf Hansson</name>
</author>
<published>2017-11-08T09:11:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5241ab40f6e742f8a1631f8826faf6dc6412b3b5'/>
<id>urn:sha1:5241ab40f6e742f8a1631f8826faf6dc6412b3b5</id>
<content type='text'>
During system-wide PM, genpd relies on its PM callbacks to be invoked for
all its attached devices, as to deal with powering off/on the PM domain. In
other words, genpd is not compatible with the direct_complete path, if
executed by the PM core for any of its attached devices.

However, when genpd's -&gt;prepare() callback invokes pm_generic_prepare(), it
does not take into account that it may return 1. Instead it treats that as
an error internally and expects the PM core to abort the prepare phase and
roll back. This leads to genpd not properly powering on/off the PM domain,
because its internal counters gets wrongly balanced.

To fix the behaviour, allow drivers to return 1 from their -&gt;prepare()
callbacks, but let's return 0 from genpd's -&gt;prepare() callback in such
case, as that prevents the PM core from running the direct_complete path
for the device.

Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Fix device resume latency framework</title>
<updated>2017-11-08T11:14:51Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-11-07T10:33:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0759e80b84e34a84e7e46e2b1adb528c83d84a47'/>
<id>urn:sha1:0759e80b84e34a84e7e46e2b1adb528c83d84a47</id>
<content type='text'>
The special value of 0 for device resume latency PM QoS means
"no restriction", but there are two problems with that.

First, device resume latency PM QoS requests with 0 as the
value are always put in front of requests with positive
values in the priority lists used internally by the PM QoS
framework, causing 0 to be chosen as an effective constraint
value.  However, that 0 is then interpreted as "no restriction"
effectively overriding the other requests with specific
restrictions which is incorrect.

Second, the users of device resume latency PM QoS have no
way to specify that *any* resume latency at all should be
avoided, which is an artificial limitation in general.

To address these issues, modify device resume latency PM QoS to
use S32_MAX as the "no constraint" value and 0 as the "no
latency at all" one and rework its users (the cpuidle menu
governor, the genpd QoS governor and the runtime PM framework)
to follow these changes.

Also add a special "n/a" value to the corresponding user space I/F
to allow user space to indicate that it cannot accept any resume
latencies at all for the given device.

Fixes: 85dc0b8a4019 (PM / QoS: Make it possible to expose PM QoS latency constraints)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323
Reported-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Reinette Chatre &lt;reinette.chatre@intel.com&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Reviewed-by: Ramesh Thomas &lt;ramesh.thomas@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pm-domains' into pm-qos</title>
<updated>2017-11-08T11:14:38Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-11-08T11:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=31f18230e480d6224e71910e9ab43a097d811fb0'/>
<id>urn:sha1:31f18230e480d6224e71910e9ab43a097d811fb0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PM / domains: Rework governor code to be more consistent</title>
<updated>2017-11-08T11:13:13Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-11-07T01:23:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=704d2ce6603f7e40bb607ae9452ff18a4cec701f'/>
<id>urn:sha1:704d2ce6603f7e40bb607ae9452ff18a4cec701f</id>
<content type='text'>
The genpd governor currently uses negative PM QoS values to indicate
the "no suspend" condition and 0 as "no restriction", but it doesn't
use them consistently.  Moreover, it tries to refresh QoS values for
already suspended devices in a quite questionable way.

For the above reasons, rework it to be a bit more consistent.

First off, note that dev_pm_qos_read_value() in
dev_update_qos_constraint() and __default_power_down_ok() is
evaluated for devices in suspend.  Moreover, that only happens if the
effective_constraint_ns value for them is negative (meaning "no
suspend").  It is not evaluated in any other cases, so effectively
the QoS values are only updated for devices in suspend that should
not have been suspended in the first place.  In all of the other
cases, the QoS values taken into account are the effective ones from
the time before the device has been suspended, so generally devices
need to be resumed and suspended again for new QoS values to take
effect anyway.  Thus evaluating dev_update_qos_constraint() in
those two places doesn't make sense at all, so drop it.

Second, initialize effective_constraint_ns to 0 ("no constraint")
rather than to (-1) ("no suspend"), which makes more sense in
general and in case effective_constraint_ns is never updated
(the device is in suspend all the time or it is never suspended)
it doesn't affect the device's parent and so on.

Finally, rework default_suspend_ok() to explicitly handle the
"no restriction" and "no suspend" special cases.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Tested-by: Tero Kristo &lt;t-kristo@ti.com&gt;
Reviewed-by: Ramesh Thomas &lt;ramesh.thomas@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Remove gpd_dev_ops.active_wakeup() callback</title>
<updated>2017-11-08T00:00:48Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2017-11-07T12:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0af45f1f6528949e05385976eb61c5ebd31854e'/>
<id>urn:sha1:d0af45f1f6528949e05385976eb61c5ebd31854e</id>
<content type='text'>
There are no more users left of the gpd_dev_ops.active_wakeup()
callback.  All have been converted to GENPD_FLAG_ACTIVE_WAKEUP.
Hence remove the callback.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Allow genpd users to specify default active wakeup behavior</title>
<updated>2017-11-08T00:00:47Z</updated>
<author>
<name>Geert Uytterhoeven</name>
</author>
<published>2017-11-07T12:48:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95a20ef6f7e54c6a982715a7d0da2fd81790db28'/>
<id>urn:sha1:95a20ef6f7e54c6a982715a7d0da2fd81790db28</id>
<content type='text'>
It is quite common for PM Domains to require slave devices to be kept
active during system suspend if they are to be used as wakeup sources.
To enable this, currently each PM Domain or driver has to provide its
own gpd_dev_ops.active_wakeup() callback.

Introduce a new flag GENPD_FLAG_ACTIVE_WAKEUP to consolidate this.
If specified, all slave devices configured as wakeup sources will be
kept active during system suspend.

PM Domains that need more fine-grained controls, based on the slave
device, can still provide their own callbacks, as before.

Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP</title>
<updated>2017-10-13T23:04:31Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2017-10-13T13:27:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=20f97caf1120bd02e8ff4adbad3b44b63626feb5'/>
<id>urn:sha1:20f97caf1120bd02e8ff4adbad3b44b63626feb5</id>
<content type='text'>
The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently
and the vast majority of code simply assumes that remote wakeup
should be enabled for devices in runtime suspend if they can
generate wakeup signals, so drop it.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Add support to select performance-state of domains</title>
<updated>2017-10-13T22:46:04Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-10-12T09:37:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42f6284ae602469762ee721ec31ddfc6170e00bc'/>
<id>urn:sha1:42f6284ae602469762ee721ec31ddfc6170e00bc</id>
<content type='text'>
Some platforms have the capability to configure the performance state of
PM domains. This patch enhances the genpd core to support such
platforms.

The performance levels (within the genpd core) are identified by
positive integer values, a lower value represents lower performance
state.

This patch adds a new genpd API, which is called by user drivers (like
OPP framework):

- int dev_pm_genpd_set_performance_state(struct device *dev,
					 unsigned int state);

  This updates the performance state constraint of the device on its PM
  domain. On success, the genpd will have its performance state set to a
  value which is &gt;= "state" passed to this routine. The genpd core calls
  the genpd-&gt;set_performance_state() callback, if implemented,
  else -ENODEV is returned to the caller.

The PM domain drivers need to implement the following callback if they
want to support performance states.

- int (*set_performance_state)(struct generic_pm_domain *genpd,
			       unsigned int state);

  This is called internally by the genpd core on several occasions. The
  genpd core passes the genpd pointer and the aggregate of the
  performance states of the devices supported by that genpd to this
  callback. This callback must update the performance state of the genpd
  (in a platform dependent way).

The power domains can avoid supplying above callback, if they don't
support setting performance-states.

Currently we aren't propagating performance state changes of a subdomain
to its masters as we don't have hardware that needs it right now. Over
that, the performance states of subdomain and its masters may not have
one-to-one mapping and would require additional information. We can get
back to this once we have hardware that needs it.

Tested-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
