aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c7
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c4
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
index 5785dc2f5bca..b8209cac7dde 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
@@ -2685,7 +2685,7 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr)
2685{ 2685{
2686 struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend); 2686 struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);
2687 uint16_t vv_id; 2687 uint16_t vv_id;
2688 uint16_t vddc = 0; 2688 uint32_t vddc = 0;
2689 uint16_t i, j; 2689 uint16_t i, j;
2690 uint32_t sclk = 0; 2690 uint32_t sclk = 0;
2691 struct phm_ppt_v1_information *table_info = 2691 struct phm_ppt_v1_information *table_info =
@@ -2716,8 +2716,9 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr)
2716 continue); 2716 continue);
2717 2717
2718 2718
2719 /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */ 2719 /* need to make sure vddc is less than 2v or else, it could burn the ASIC.
2720 PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0), 2720 * real voltage level in unit of 0.01mv */
2721 PP_ASSERT_WITH_CODE((vddc < 200000 && vddc != 0),
2721 "Invalid VDDC value", result = -EINVAL;); 2722 "Invalid VDDC value", result = -EINVAL;);
2722 2723
2723 /* the voltage should not be zero nor equal to leakage ID */ 2724 /* the voltage should not be zero nor equal to leakage ID */
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
index bf4e18fd3872..90b35c5c10a4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c
@@ -1256,7 +1256,7 @@ int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock,
1256} 1256}
1257 1257
1258int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type, 1258int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
1259 uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage) 1259 uint32_t sclk, uint16_t virtual_voltage_Id, uint32_t *voltage)
1260{ 1260{
1261 1261
1262 int result; 1262 int result;
@@ -1274,7 +1274,7 @@ int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_
1274 if (0 != result) 1274 if (0 != result)
1275 return result; 1275 return result;
1276 1276
1277 *voltage = get_voltage_info_param_space.usVoltageLevel; 1277 *voltage = ((GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_3 *)(&get_voltage_info_param_space))->ulVoltageLevel;
1278 1278
1279 return result; 1279 return result;
1280} 1280}
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h
index 248c5db5f380..1e35a9625baf 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h
@@ -305,7 +305,7 @@ extern int atomctrl_get_engine_pll_dividers_ai(struct pp_hwmgr *hwmgr, uint32_t
305extern int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock, 305extern int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock,
306 uint8_t level); 306 uint8_t level);
307extern int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type, 307extern int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
308 uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage); 308 uint32_t sclk, uint16_t virtual_voltage_Id, uint32_t *voltage);
309extern int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl_sclk_range_table *table); 309extern int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl_sclk_range_table *table);
310 310
311extern int atomctrl_get_avfs_information(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl__avfs_parameters *param); 311extern int atomctrl_get_avfs_information(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl__avfs_parameters *param);