diff options
| author | Charles Kong <charlesk@nvidia.com> | 2014-08-19 16:58:45 -0400 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:58 -0400 |
| commit | 0a7be116952af71ce89f0bcd22dbebbef1e90102 (patch) | |
| tree | ca1f2654a50afb868a50cf7f1b8b9eb75ddebcfa | |
| parent | 04c498454474ca9d70b362c8f0fe338938a13f3f (diff) | |
video: tegra: host: fix bw clock calculation
Fixed the per-type aggregation of clock contraints. Corrected
the calculation of bw clock.
Bug 200026186
Change-Id: Ie97ef00543e64d96077ad05934fed99a20fe1bf0
Signed-off-by: Charles Kong <charlesk@nvidia.com>
Reviewed-on: http://git-master/r/482197
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
| -rw-r--r-- | drivers/video/tegra/host/nvhost_acm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.c b/drivers/video/tegra/host/nvhost_acm.c index 948d7ac3f..b98d0e66a 100644 --- a/drivers/video/tegra/host/nvhost_acm.c +++ b/drivers/video/tegra/host/nvhost_acm.c | |||
| @@ -311,7 +311,7 @@ static int nvhost_module_update_rate(struct platform_device *dev, int index) | |||
| 311 | 311 | ||
| 312 | if (type == NVHOST_BW) | 312 | if (type == NVHOST_BW) |
| 313 | bw_constraint += constraint; | 313 | bw_constraint += constraint; |
| 314 | if (type == NVHOST_PIXELRATE) | 314 | else if (type == NVHOST_PIXELRATE) |
| 315 | pixelrate += constraint; | 315 | pixelrate += constraint; |
| 316 | else | 316 | else |
| 317 | floor_rate = max(floor_rate, constraint); | 317 | floor_rate = max(floor_rate, constraint); |
| @@ -324,8 +324,9 @@ static int nvhost_module_update_rate(struct platform_device *dev, int index) | |||
| 324 | 324 | ||
| 325 | /* if frequency is not available, use default policy */ | 325 | /* if frequency is not available, use default policy */ |
| 326 | if (!rate) { | 326 | if (!rate) { |
| 327 | unsigned long bw_rate = nvhost_emc_bw_to_freq_req(rate); | 327 | unsigned long bw_freq_khz = |
| 328 | rate = max(floor_rate, bw_rate); | 328 | nvhost_emc_bw_to_freq_req(bw_constraint); |
| 329 | rate = max(floor_rate, bw_freq_khz << 10); | ||
| 329 | } | 330 | } |
| 330 | 331 | ||
| 331 | /* take devfreq rate into account */ | 332 | /* take devfreq rate into account */ |
