diff options
author | Nishanth Menon <nm@ti.com> | 2012-08-01 20:50:04 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-08-01 20:50:04 +0800 |
commit | 861b093894dc218ee5e90890736cf340f751fed9 (patch) | |
tree | 15dd1be0def227bdcc753588a1f8a43889b64141 | |
parent | 0ed55dad1abe3c9474a251eba01910331485875c (diff) |
OMAP3+: PM: DVFS: scale only target_device freq when list is empty
On scaling a dependent voltage domain, if the dependent target device's
frequency list is empty, we should scale just the dependent device's
frequency corresponding to the voltage we are scaling to. This is to
handle conditions such as core voltage scale to OPP100 without a
corresponding bus bandwidth request pending, it makes sense to scale
the dependent device's frequency as well(in this case core).
However, we currently scale all devices hooked on to the domain
to the corresponding frequencies corresponding to the voltage
request when the list for that device is empty, this implies, when
we have a dependency table as the following:
vdd_core
|- voltage requests
| |
| |-1025000: platform:mpu.0
| |-1250000: pvrsrvkm:pvrsrvkm.0
| X
|
|- frequency requests
| |
| |- platform:l3_main_1.0
| | `-none
| |- pvrsrvkm:pvrsrvkm.0
| | |-384000000: pvrsrvkm:pvrsrvkm.0
| | X
| |- rpres:fdif.0
| | `-none
| |- omap_hsi:omap_hsi.0
| | `-none
| |- platform:iss.0
| | `-none
| X
We will attempt to scale fdif, hsi and iss in addition to scaling
core frequency which is not the intended behavior. Instead we check
for the matching target device(l3_main_l1.0) before selecting
correponding frequency, if there are no explicit frequency requests
for that device.
Signed-off-by: Nishanth Menon <nm@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/dvfs.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c index 51541e3418f..a7f5f7f5311 100644 --- a/arch/arm/mach-omap2/dvfs.c +++ b/arch/arm/mach-omap2/dvfs.c @@ -751,12 +751,19 @@ static int _dvfs_scale(struct device *req_dev, struct device *target_dev, node = plist_last(&temp_dev->freq_user_list); freq = node->prio; } else { - /* dep domain? we'd probably have a voltage request */ - rcu_read_lock(); - opp = _volt_to_opp(dev, new_volt); - if (!IS_ERR(opp)) - freq = opp_get_freq(opp); - rcu_read_unlock(); + /* + * Is the dev of dep domain target_device? + * we'd probably have a voltage request without + * a frequency dependency, scale appropriate frequency + * if there are none pending + */ + if (target_dev == dev) { + rcu_read_lock(); + opp = _volt_to_opp(dev, new_volt); + if (!IS_ERR(opp)) + freq = opp_get_freq(opp); + rcu_read_unlock(); + } if (!freq) continue; } |