PM / Domains: Rework default device stop governor function, v2
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 29 Apr 2012 20:54:17 +0000 (22:54 +0200)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 23 Jul 2012 08:34:50 +0000 (13:34 +0530)
commit32dccdb30e01888d7046df6dd8dad4851f85e5f4
treea8c7cbb505c3788b22db759027876fa4a2212d96
parent614e95c6fe8fb6cdef60b1f6b874a18985ca96e4
PM / Domains: Rework default device stop governor function, v2

The existing default device stop governor function for PM domains,
default_stop_ok(), is supposed to check whether or not the device's
PM QoS latency constraint will be violated if the device is stopped
by pm_genpd_runtime_suspend().  However, the computations carried out
by it don't reflect the definition of the PM QoS latency constrait in
Documentation/ABI/testing/sysfs-devices-power.

Make default_stop_ok() follow the definition of the PM QoS latency
constrait.  In particular, make it take the device's start and stop
latencies correctly.

Add a new field, effective_constraint_ns, to struct gpd_timing_data
and use it to store the difference between the device's PM QoS
constraint and its resume latency for use by the device's parent
(the effective_constraint_ns values for the children are used for
computing the parent's one along with its PM QoS constraint).

Remove the break_even_ns field from struct gpd_timing_data, because
it's not used any more.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/domain.c
drivers/base/power/domain_governor.c
include/linux/pm_domain.h