From a58dc5728259e083533b0a534620a930bb34a4ba Mon Sep 17 00:00:00 2001 From: Cyril Raju Date: Mon, 30 Jan 2017 17:37:05 -0800 Subject: Revert "Revert "nvgpu: gp10b:remove EMC floor when GPU Fmin"" This reverts commit 74948b73e3667 ("Revert "nvgpu: gp10b: remove EMC floor when GPU Fmin"") The orginal patch caused instability in GVS and was reverted for unknown reasons.This reverts the revert. Revert patch : http://git-master/r/#/c/1291512/ Original patch : http://git-master/r/#/c/1284572/ Bug 1864117 Bug 1863013 Change-Id: Iaeef74296d0df4bb63d02d567e0d4be63688643a Signed-off-by: Cyril Raju Reviewed-on: http://git-master/r/1296294 Reviewed-by: svccoveritychecker Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index fe42bf97..e428f9e6 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c @@ -312,7 +312,14 @@ static void gp10b_tegra_postscale(struct device *pdev, gk20a_dbg_fn(""); if (profile && !gp10b_tegra_is_railgated(pdev)) { - emc_rate = (freq * EMC_BW_RATIO * g->emc3d_ratio) / 1000; + unsigned long emc_scale; + + if (freq <= gp10b_freq_table[0]) + emc_scale = 0; + else + emc_scale = g->emc3d_ratio; + + emc_rate = (freq * EMC_BW_RATIO * emc_scale) / 1000; if (emc_rate > tegra_bwmgr_get_max_emc_rate()) emc_rate = tegra_bwmgr_get_max_emc_rate(); -- cgit v1.2.2