mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: set p state floor for sys and xbar clk
bug 200254784 If XBAR and SYS clocks for a given GPC clock point is lower than minimum value mentioned in P state set the floor to minimum value mentioned in p state. it was set to value based ratio of a GPC clk value in VF table which can give value higher than one mentioned in p state. Ignore ratio and just set to p state value Change-Id: I9f7cd1d5842d057aff6d8243a31ab503ce35a8ca Signed-off-by: Vijayakumar <vsubbu@nvidia.com> Reviewed-on: http://git-master/r/1257251 Reviewed-by: Automatic_Commit_Validation_User (cherry picked from commit 5798680286967ff999f674bedd4fc0411615f914) Reviewed-on: http://git-master/r/1270949 GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Deepak Nibade
parent
8cc67f6064
commit
8edfc9ee67
@@ -617,7 +617,6 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
|
||||
table->gpc2clk_points[j].gpc_mhz =
|
||||
arb->gpc2clk_f_points[i];
|
||||
|
||||
setfllclk.gpc2clkmhz = arb->gpc2clk_f_points[i];
|
||||
status = clk_get_fll_clks(g, &setfllclk);
|
||||
if (status < 0) {
|
||||
@@ -626,7 +625,6 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
goto exit_vf_table;
|
||||
}
|
||||
|
||||
|
||||
table->gpc2clk_points[j].sys_mhz =
|
||||
setfllclk.sys2clkmhz;
|
||||
table->gpc2clk_points[j].xbar_mhz =
|
||||
@@ -653,7 +651,6 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
|
||||
/* Second pass */
|
||||
for (i = 0, j = 0; i < table->gpc2clk_num_points; i++) {
|
||||
struct set_fll_clk setfllclk;
|
||||
|
||||
u16 alt_gpc2clk = table->gpc2clk_points[i].gpc_mhz;
|
||||
gpc2clk_voltuv = gpc2clk_voltuv_sram = 0;
|
||||
@@ -673,9 +670,9 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
if (table->gpc2clk_points[j].sys_mhz >=
|
||||
p5_info->min_mhz) {
|
||||
|
||||
|
||||
table->gpc2clk_points[i].sys_mhz =
|
||||
table->gpc2clk_points[j].
|
||||
sys_mhz;
|
||||
p5_info->min_mhz;
|
||||
|
||||
alt_gpc2clk = alt_gpc2clk <
|
||||
table->gpc2clk_points[j].
|
||||
@@ -709,8 +706,8 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
p5_info->min_mhz) {
|
||||
|
||||
table->gpc2clk_points[i].xbar_mhz =
|
||||
table->gpc2clk_points[j].
|
||||
xbar_mhz;
|
||||
p5_info->min_mhz;
|
||||
|
||||
alt_gpc2clk = alt_gpc2clk <
|
||||
table->gpc2clk_points[j].
|
||||
gpc_mhz ?
|
||||
@@ -728,24 +725,6 @@ static int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
|
||||
}
|
||||
}
|
||||
|
||||
/* alternate gpc2clk clock has been requested, we need to
|
||||
* calculate new ratios */
|
||||
if (alt_gpc2clk != table->gpc2clk_points[i].gpc_mhz) {
|
||||
setfllclk.gpc2clkmhz = alt_gpc2clk;
|
||||
|
||||
status = clk_get_fll_clks(g, &setfllclk);
|
||||
if (status < 0) {
|
||||
gk20a_err(dev_from_gk20a(g),
|
||||
"failed to get GPC2CLK slave clocks");
|
||||
goto exit_vf_table;
|
||||
}
|
||||
|
||||
table->gpc2clk_points[i].sys_mhz =
|
||||
setfllclk.sys2clkmhz;
|
||||
table->gpc2clk_points[i].xbar_mhz =
|
||||
setfllclk.xbar2clkmhz;
|
||||
}
|
||||
|
||||
/* Calculate voltages */
|
||||
status = clk_domain_get_f_or_v(g, CTRL_CLK_DOMAIN_GPC2CLK,
|
||||
&alt_gpc2clk, &gpc2clk_voltuv,
|
||||
|
||||
Reference in New Issue
Block a user