diff --git a/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.c b/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.c index 2534f52b6..6ef8e6973 100644 --- a/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.c +++ b/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.c @@ -91,7 +91,16 @@ int gv100_get_arbiter_clk_range(struct gk20a *g, u32 api_domain, gpcclk_cap_mhz = p0_info->max_mhz; max_min_freq_mhz = nvgpu_pmu_clk_fll_get_min_max_freq(g); - /* WAR for DVCO min */ + /* + * When DVCO min is 0 in vbios update it to DVCO_MIN_DEFAULT_MHZ. + */ + if (max_min_freq_mhz == 0U) { + max_min_freq_mhz = DVCO_MIN_DEFAULT_MHZ; + } + + /* + * Needed for DVCO min. + */ if (api_domain == CTRL_CLK_DOMAIN_GPCCLK) { if ((max_min_freq_mhz != 0U) && (max_min_freq_mhz >= limit_min_mhz)) { diff --git a/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.h b/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.h index f8e1112ff..386e3cc9f 100644 --- a/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.h +++ b/drivers/gpu/nvgpu/common/clk_arb/clk_arb_gv100.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2020, 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"), @@ -25,6 +25,8 @@ struct nvgpu_clk_session; struct nvgpu_clk_arb; +#define DVCO_MIN_DEFAULT_MHZ 405 + bool gv100_check_clk_arb_support(struct gk20a *g); u32 gv100_get_arbiter_clk_domains(struct gk20a *g); int gv100_get_arbiter_f_points(struct gk20a *g,u32 api_domain,