gpu: nvgpu: tegra gpu to emc frequency mapping

o emc clock scaling (bug fix):
  Take the gpu load into account for gpu frequencies less
  than or equal to fmax @ Vmin.

Bug 1591643

Change-Id: I0298adfdd4b7111557907c3bd6022fd6005355f0
Signed-off-by: Anders Kugler <akugler@nvidia.com>
Reviewed-on: http://git-master/r/735846
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Anders Kugler
2015-04-24 17:17:45 -07:00
committed by Ishan Mittal
parent d20afe7bd4
commit 069accc857

View File

@@ -162,8 +162,9 @@ static unsigned long gk20a_tegra_get_emc_rate(struct gk20a *g,
gpu_fmax_at_vmin = tegra_dvfs_get_fmax_at_vmin_safe_t(
clk_get_parent(g->clk.tegra_clk));
/* When scaling emc, only account for the gpu load below fmax@vmin */
if (gpu_freq < gpu_fmax_at_vmin)
/* When scaling emc, account for the gpu load when the
* gpu frequency is less than or equal to fmax@vmin. */
if (gpu_freq <= gpu_fmax_at_vmin)
emc_scale = min(g->pmu.load_avg, g->emc3d_ratio);
else
emc_scale = g->emc3d_ratio;