diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2016-09-01 05:47:34 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:49 -0500 |
commit | 2d3ba5478d0d9a12b123a0261653d33eb37e6e87 (patch) | |
tree | 63bc1a1568914edffe31dabf5d05e6ac10c42970 | |
parent | 5159f6bf43dc4822f6f05a957f0cf090ff3e1db7 (diff) |
gpu: nvgpu: Clocks params update
- Clocks params update as per r370
JIRA DNVGPU-116
Change-Id: I0aaa1e275aaa2027f2839f3fe24c9aee3e14fd8d
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1212827
(cherry picked from commit 54df6ad9668d46dffb5b9d03265948a47611ff13)
Reviewed-on: http://git-master/r/1227288
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_domain.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_domain.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.h | 4 |
6 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.c b/drivers/gpu/nvgpu/clk/clk_domain.c index dc485e6b..7371946c 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.c +++ b/drivers/gpu/nvgpu/clk/clk_domain.c | |||
@@ -94,6 +94,7 @@ static u32 _clk_domains_pmudatainit_3x(struct gk20a *g, | |||
94 | pset->b_override_o_v_o_c = false; | 94 | pset->b_override_o_v_o_c = false; |
95 | pset->b_debug_mode = false; | 95 | pset->b_debug_mode = false; |
96 | pset->b_enforce_vf_monotonicity = pdomains->b_enforce_vf_monotonicity; | 96 | pset->b_enforce_vf_monotonicity = pdomains->b_enforce_vf_monotonicity; |
97 | pset->b_enforce_vf_smoothening = pdomains->b_enforce_vf_smoothening; | ||
97 | pset->volt_rails_max = 2; | 98 | pset->volt_rails_max = 2; |
98 | status = boardobjgrpmask_export( | 99 | status = boardobjgrpmask_export( |
99 | &pdomains->master_domains_mask.super, | 100 | &pdomains->master_domains_mask.super, |
@@ -168,6 +169,7 @@ u32 clk_domain_sw_setup(struct gk20a *g) | |||
168 | boardobjgrpmask_e32_init(&pclkdomainobjs->prog_domains_mask, NULL); | 169 | boardobjgrpmask_e32_init(&pclkdomainobjs->prog_domains_mask, NULL); |
169 | boardobjgrpmask_e32_init(&pclkdomainobjs->master_domains_mask, NULL); | 170 | boardobjgrpmask_e32_init(&pclkdomainobjs->master_domains_mask, NULL); |
170 | pclkdomainobjs->b_enforce_vf_monotonicity = true; | 171 | pclkdomainobjs->b_enforce_vf_monotonicity = true; |
172 | pclkdomainobjs->b_enforce_vf_smoothening = true; | ||
171 | 173 | ||
172 | memset(&pclkdomainobjs->ordered_noise_aware_list, 0, | 174 | memset(&pclkdomainobjs->ordered_noise_aware_list, 0, |
173 | sizeof(pclkdomainobjs->ordered_noise_aware_list)); | 175 | sizeof(pclkdomainobjs->ordered_noise_aware_list)); |
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.h b/drivers/gpu/nvgpu/clk/clk_domain.h index 94d612a7..2670a066 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.h +++ b/drivers/gpu/nvgpu/clk/clk_domain.h | |||
@@ -33,6 +33,7 @@ struct clk_domains { | |||
33 | u8 n_num_entries; | 33 | u8 n_num_entries; |
34 | u8 version; | 34 | u8 version; |
35 | bool b_enforce_vf_monotonicity; | 35 | bool b_enforce_vf_monotonicity; |
36 | bool b_enforce_vf_smoothening; | ||
36 | u32 vbios_domains; | 37 | u32 vbios_domains; |
37 | struct boardobjgrpmask_e32 prog_domains_mask; | 38 | struct boardobjgrpmask_e32 prog_domains_mask; |
38 | struct boardobjgrpmask_e32 master_domains_mask; | 39 | struct boardobjgrpmask_e32 master_domains_mask; |
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index d87581c4..4bf473ac 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c | |||
@@ -433,6 +433,7 @@ static u32 _clk_prog_pmudatainit_1x_master(struct gk20a *g, | |||
433 | memcpy(pset->vf_entries, pclk_prog_1x_master->p_vf_entries, vfsize); | 433 | memcpy(pset->vf_entries, pclk_prog_1x_master->p_vf_entries, vfsize); |
434 | 434 | ||
435 | pset->b_o_c_o_v_enabled = pclk_prog_1x_master->b_o_c_o_v_enabled; | 435 | pset->b_o_c_o_v_enabled = pclk_prog_1x_master->b_o_c_o_v_enabled; |
436 | pset->source_data = pclk_prog_1x_master->source_data; | ||
436 | 437 | ||
437 | memcpy(&pset->deltas, &pclk_prog_1x_master->deltas, | 438 | memcpy(&pset->deltas, &pclk_prog_1x_master->deltas, |
438 | (u32) sizeof(struct ctrl_clk_clk_delta)); | 439 | (u32) sizeof(struct ctrl_clk_clk_delta)); |
@@ -810,11 +811,9 @@ static u32 vfflatten_prog_1x_master(struct gk20a *g, | |||
810 | /* FLL sources use a voltage-based VF_POINT.*/ | 811 | /* FLL sources use a voltage-based VF_POINT.*/ |
811 | vf_point_data.board_obj.type = | 812 | vf_point_data.board_obj.type = |
812 | CTRL_CLK_CLK_VF_POINT_TYPE_VOLT; | 813 | CTRL_CLK_CLK_VF_POINT_TYPE_VOLT; |
813 | vf_point_data.volt.clk_domain_idx = clk_domain_idx; | ||
814 | for (i = 0; i < step_count; i++) { | 814 | for (i = 0; i < step_count; i++) { |
815 | vf_point_data.volt.source_voltage_uv = | 815 | vf_point_data.volt.source_voltage_uv = |
816 | voltage_min_uv + i * voltage_step_size_uv; | 816 | voltage_min_uv + i * voltage_step_size_uv; |
817 | vf_point_data.volt.vf_gain_vfe_equ_idx = p_vf_rail->gain_vfe_idx; | ||
818 | 817 | ||
819 | status = _clk_prog_1x_master_rail_construct_vf_point(g, pclk, | 818 | status = _clk_prog_1x_master_rail_construct_vf_point(g, pclk, |
820 | p1xmaster, p_vf_rail, | 819 | p1xmaster, p_vf_rail, |
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.h b/drivers/gpu/nvgpu/clk/clk_prog.h index 2dd8f6c8..8718bdd6 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.h +++ b/drivers/gpu/nvgpu/clk/clk_prog.h | |||
@@ -49,8 +49,8 @@ struct clk_prog_1x_master { | |||
49 | struct clk_prog_1x super; | 49 | struct clk_prog_1x super; |
50 | bool b_o_c_o_v_enabled; | 50 | bool b_o_c_o_v_enabled; |
51 | struct ctrl_clk_clk_prog_1x_master_vf_entry *p_vf_entries; | 51 | struct ctrl_clk_clk_prog_1x_master_vf_entry *p_vf_entries; |
52 | |||
53 | struct ctrl_clk_clk_delta deltas; | 52 | struct ctrl_clk_clk_delta deltas; |
53 | union ctrl_clk_clk_prog_1x_master_source_data source_data; | ||
54 | vf_flatten *vfflatten; | 54 | vf_flatten *vfflatten; |
55 | }; | 55 | }; |
56 | 56 | ||
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.c b/drivers/gpu/nvgpu/clk/clk_vf_point.c index 275bef96..a8cc6403 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.c +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.c | |||
@@ -197,8 +197,6 @@ static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g, | |||
197 | ppmudata; | 197 | ppmudata; |
198 | 198 | ||
199 | pset->source_voltage_uv = pclk_vf_point_volt->source_voltage_uv; | 199 | pset->source_voltage_uv = pclk_vf_point_volt->source_voltage_uv; |
200 | pset->vf_gain_vfe_equ_idx = pclk_vf_point_volt->vf_gain_vfe_equ_idx; | ||
201 | pset->clk_domain_idx = pclk_vf_point_volt->clk_domain_idx; | ||
202 | pset->freq_delta_khz = pclk_vf_point_volt->freq_delta_khz; | 200 | pset->freq_delta_khz = pclk_vf_point_volt->freq_delta_khz; |
203 | 201 | ||
204 | return status; | 202 | return status; |
@@ -256,8 +254,6 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g, | |||
256 | _clk_vf_point_pmudatainit_volt; | 254 | _clk_vf_point_pmudatainit_volt; |
257 | 255 | ||
258 | pclkvfpoint->source_voltage_uv = ptmpvfpoint->source_voltage_uv; | 256 | pclkvfpoint->source_voltage_uv = ptmpvfpoint->source_voltage_uv; |
259 | pclkvfpoint->vf_gain_vfe_equ_idx = ptmpvfpoint->vf_gain_vfe_equ_idx; | ||
260 | pclkvfpoint->clk_domain_idx = ptmpvfpoint->clk_domain_idx; | ||
261 | 257 | ||
262 | return status; | 258 | return status; |
263 | } | 259 | } |
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.h b/drivers/gpu/nvgpu/clk/clk_vf_point.h index 708f80f1..b05ab818 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.h +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.h | |||
@@ -36,11 +36,7 @@ struct clk_vf_point { | |||
36 | struct clk_vf_point_volt { | 36 | struct clk_vf_point_volt { |
37 | struct clk_vf_point super; | 37 | struct clk_vf_point super; |
38 | u32 source_voltage_uv; | 38 | u32 source_voltage_uv; |
39 | u8 vf_gain_vfe_equ_idx; | ||
40 | u8 clk_domain_idx; | ||
41 | u16 vf_gain_value; | ||
42 | int freq_delta_khz; | 39 | int freq_delta_khz; |
43 | |||
44 | }; | 40 | }; |
45 | 41 | ||
46 | struct clk_vf_point_freq { | 42 | struct clk_vf_point_freq { |