From 1691c34a6860eb746894d495eb39b25010a92826 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 27 Jun 2018 17:15:26 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1763641 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_arb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c') 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 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -545,7 +545,7 @@ find_exit: /* noise unaware vmin */ *nuvmin = mclk_voltuv; *nuvmin_sram = mclk_voltuv_sram; - *gpc2clk = gpc2clk_target < *gpc2clk ? gpc2clk_target : *gpc2clk; + *gpc2clk = gpc2clk_target; *mclk = mclk_target; return pstate; } -- cgit v1.2.2