From cf2ac655fdaeba5779ce9d73cbe567218a7c5a58 Mon Sep 17 00:00:00 2001 From: Vishruth Date: Mon, 2 Jul 2018 10:57:39 +0530 Subject: gpu: nvgpu: fix missing max frequency The last frequency in the local array with all frequencies was missed as the index was used as count. This caused max frequency to be not listed among available frequencies, when few frequencies were configured in BPMPFW-DT. Bug 200381453 Change-Id: I72d000ed1842c41555f2de36209fa4e12188c325 Signed-off-by: Vishruth Reviewed-on: https://git-master.nvidia.com/r/1767642 Reviewed-by: svc-mobile-coverity Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index 3fc216a1..dccc5c3e 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c @@ -362,7 +362,7 @@ int gp10b_clk_get_freqs(struct device *dev, if (new_rate == max_rate) break; } - freq_counter = i; + freq_counter = i + 1; WARN_ON(freq_counter == GP10B_MAX_SUPPORTED_FREQS); /* -- cgit v1.2.2