From 157ff622f3156a68281a5d1c0eb97bc8ad3a5b3b Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 12 Jan 2017 21:16:30 +0530 Subject: gpu: nvgpu: gp10b: fix freq rounding In gp10b_round_clk_rate(), we right now return next higher freq value than requested if requested value matches a value in the table Fix this by adding a right comparison Bug 200194487 Change-Id: Ia99abfe4b247701d5ee1cda26b3ffcc18efba353 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1284302 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c') diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index 9f45c929..e428f9e6 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c @@ -348,7 +348,7 @@ static long gp10b_round_clk_rate(struct device *dev, unsigned long rate) int i; for (i = 0; i < max_states; ++i) - if (freq_table[i] > rate) + if (freq_table[i] >= rate) return freq_table[i]; return freq_table[max_states - 1]; -- cgit v1.2.2