From d61a84c8d1949811c812347e63b2279d294a7fa4 Mon Sep 17 00:00:00 2001 From: Tejal Kudav Date: Mon, 18 Oct 2021 05:57:33 +0000 Subject: [PATCH] gpu: nvgpu: ga10b: Set GPU clocks to max rate Max GPU clk supported by BPMP is 1.275GHz. Remove the hard-coded default value of 1GHz and pass an arbitrary high value to BPMP API to set the clocks to max rate. Use UINT_MAX instead of a hardcoded clk max_rate value (like 1.275GHz) to ensure that the max clock rate supported by BPMP is chosen during clk_set_rate(). Bug 200779751 Change-Id: I08719c3348e7e5c86aa45b423bac3a099cead005 Signed-off-by: Tejal Kudav Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2612146 Tested-by: mobile promotions Reviewed-by: svcacv Reviewed-by: Konsta Holtta Reviewed-by: Alex Waterman Reviewed-by: Debarshi Dutta Reviewed-by: Sagar Kamble Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c index 9ec0e6c55..6624bfadd 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c @@ -54,8 +54,6 @@ #define EMC3D_GA10B_RATIO 500 -#define GPCCLK_INIT_RATE 1000000000UL - /* * To-do: clean these defines and include * BPMP header. @@ -72,9 +70,9 @@ /* Run gpc0, gpc1 and sysclk at same rate */ struct gk20a_platform_clk tegra_ga10b_clocks[] = { - {"sysclk", GPCCLK_INIT_RATE}, - {"gpc0clk", GPCCLK_INIT_RATE}, - {"gpc1clk", GPCCLK_INIT_RATE}, + {"sysclk", UINT_MAX}, + {"gpc0clk", UINT_MAX}, + {"gpc1clk", UINT_MAX}, {"fuse", UINT_MAX} };