mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1284302 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
76dc6659ff
commit
157ff622f3
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user