aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/power/domain.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-04-29 22:54:17 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-01 21:28:03 +0200
commita5bef810ad9816a3a8e500d8832be77d52903a12 (patch)
treedd108feaf2fa45f9520b63ea94ecec2c42259194 /drivers/base/power/domain.c
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
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>
Diffstat (limited to 'drivers/base/power/domain.c')
-rw-r--r--drivers/base/power/domain.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 73ce9fbe983..3c6e94fe058 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -506,6 +506,7 @@ static int pm_genpd_runtime_suspend(struct device *dev)
if (dev_gpd_data(dev)->always_on)
return -EBUSY;
+ dev_gpd_data(dev)->td.effective_constraint_ns = -1;
stop_ok = genpd->gov ? genpd->gov->stop_ok : NULL;
if (stop_ok && !stop_ok(dev))
return -EBUSY;