summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-06-29 16:37:35 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-07-06 17:44:14 -0400
commite5eb37170b3cbbf948c6aeaccece818a59e76a6c (patch)
treee2db33d3e81cd211712790d87980d90173481b5a /drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
parent4b2427605e5325eafb5cfc2698f517db68e41075 (diff)
downloadop-kernel-dev-e5eb37170b3cbbf948c6aeaccece818a59e76a6c.zip
op-kernel-dev-e5eb37170b3cbbf948c6aeaccece818a59e76a6c.tar.gz
drm/amd/powerplay: fix bug that get wrong polaris evv voltage.
value is 32 bits for polaris, not 16. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
index 5785dc2..b8209ca 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)
{
struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);
uint16_t vv_id;
- uint16_t vddc = 0;
+ uint32_t vddc = 0;
uint16_t i, j;
uint32_t sclk = 0;
struct phm_ppt_v1_information *table_info =
@@ -2716,8 +2716,9 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr)
continue);
- /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */
- PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0),
+ /* need to make sure vddc is less than 2v or else, it could burn the ASIC.
+ * real voltage level in unit of 0.01mv */
+ PP_ASSERT_WITH_CODE((vddc < 200000 && vddc != 0),
"Invalid VDDC value", result = -EINVAL;);
/* the voltage should not be zero nor equal to leakage ID */
OpenPOWER on IntegriCloud