diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_scale.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c index 36a47e24..edf92de6 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * gk20a clock scaling profile | 2 | * gk20a clock scaling profile |
3 | * | 3 | * |
4 | * Copyright (c) 2013-2016, NVIDIA Corporation. All rights reserved. | 4 | * Copyright (c) 2013-2017, NVIDIA Corporation. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -181,13 +181,13 @@ static int gk20a_scale_target(struct device *dev, unsigned long *freq, | |||
181 | if (local_freq > max_freq) | 181 | if (local_freq > max_freq) |
182 | local_freq = max_freq; | 182 | local_freq = max_freq; |
183 | 183 | ||
184 | /* Check for duplicate request */ | ||
185 | if (local_freq == g->last_freq) | ||
186 | return 0; | ||
187 | |||
188 | /* set the final frequency */ | 184 | /* set the final frequency */ |
189 | rounded_rate = platform->clk_round_rate(dev, local_freq); | 185 | rounded_rate = platform->clk_round_rate(dev, local_freq); |
190 | 186 | ||
187 | /* Check for duplicate request */ | ||
188 | if (rounded_rate == g->last_freq) | ||
189 | return 0; | ||
190 | |||
191 | if (platform->clk_get_rate(dev) == rounded_rate) | 191 | if (platform->clk_get_rate(dev) == rounded_rate) |
192 | *freq = rounded_rate; | 192 | *freq = rounded_rate; |
193 | else { | 193 | else { |