summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_arb.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2018-06-27 20:15:26 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-01 10:03:03 -0400
commit1691c34a6860eb746894d495eb39b25010a92826 (patch)
tree2f336c0456e3dd85a865f66d940cfd349aa63fc4 /drivers/gpu/nvgpu/clk/clk_arb.c
parentcd7c4331453af7751a19bd96150715b86b8ca2ca (diff)
gpu: nvgpu: adjust gpc2clk to nearest V/f point
When requesting a gpc2clck below lowest V/f point, clock arbiter did not properly adjust target value to nearest V/f point. This could lead to lower than expected effective frequency. Fixed the logic to adjust to nearest V/f point. Bug 200412996 Change-Id: I36c24b4c081931e2ac54da14d49e46fcb14503e3 (cherry picked from commit 7ed1f8fb39f76208922daa91d00905cdb96b2304) Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1763641 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_arb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c
index 539cd33e..e277875b 100644
--- a/drivers/gpu/nvgpu/clk/clk_arb.c
+++ b/drivers/gpu/nvgpu/clk/clk_arb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -545,7 +545,7 @@ find_exit:
545 /* noise unaware vmin */ 545 /* noise unaware vmin */
546 *nuvmin = mclk_voltuv; 546 *nuvmin = mclk_voltuv;
547 *nuvmin_sram = mclk_voltuv_sram; 547 *nuvmin_sram = mclk_voltuv_sram;
548 *gpc2clk = gpc2clk_target < *gpc2clk ? gpc2clk_target : *gpc2clk; 548 *gpc2clk = gpc2clk_target;
549 *mclk = mclk_target; 549 *mclk = mclk_target;
550 return pstate; 550 return pstate;
551} 551}