diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-07-05 07:18:15 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 15:06:24 -0400 |
commit | b1814a1def0564a2a1d3be7fa5bf7243ff899a28 (patch) | |
tree | 475fe063c8f004da0e87ce4e4a80aeb2a1aeacae | |
parent | ccdbb20a75e3e3917f327a185c1a45722b5d359f (diff) |
drm/amd/powerplay: don't add invalid voltage.
if atomctrl_get_voltage_evv_on_sclk_ai returns
non zero (fail) in the expansion of the
PP_ASSERT_WITH_CODE macro the continue will
actually do nothing, So invalid voltage will be
added to ppbable.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 12 |
1 files changed, 6 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 69be3e59694f..9d764c4d253e 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | |||
@@ -2871,12 +2871,12 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr) | |||
2871 | } | 2871 | } |
2872 | } | 2872 | } |
2873 | 2873 | ||
2874 | 2874 | if (atomctrl_get_voltage_evv_on_sclk_ai(hwmgr, | |
2875 | PP_ASSERT_WITH_CODE(0 == atomctrl_get_voltage_evv_on_sclk_ai(hwmgr, | 2875 | VOLTAGE_TYPE_VDDC, |
2876 | VOLTAGE_TYPE_VDDC, sclk, vv_id, &vddc), | 2876 | sclk, vv_id, &vddc) != 0) { |
2877 | "Error retrieving EVV voltage value!", | 2877 | printk(KERN_WARNING "failed to retrieving EVV voltage!\n"); |
2878 | continue); | 2878 | continue; |
2879 | 2879 | } | |
2880 | 2880 | ||
2881 | /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */ | 2881 | /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */ |
2882 | PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0), | 2882 | PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0), |