diff options
author | Moritz Kühner <kuehner.moritz@gmail.com> | 2016-04-17 16:15:23 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-04 20:30:24 -0400 |
commit | c790f87318337738208b0a32697d88312a26086c (patch) | |
tree | f1a44a2560d81a630cf6a8aacd87855d3132e64f /drivers/gpu/drm/amd/powerplay | |
parent | 74c97375e53736ca3b615be43696a8507062970f (diff) |
drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V
If the tonga gpu is controlled by SVID2 tonga_get_evv_voltage will only print
an error if the voltage exceeds 2V although a comment clearly states that it
needs be less than 2V.
v2: added signed of by
Signed-off-by: Moritz Kühner <kuehner.moritz@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c index 28f5c65b7b4e..59dd78c05596 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c @@ -458,8 +458,7 @@ int tonga_get_evv_voltage(struct pp_hwmgr *hwmgr) "Error retrieving EVV voltage value!", continue); /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */ - if (vddc > 2000) - printk(KERN_ERR "[ powerplay ] Invalid VDDC value! \n"); + PP_ASSERT_WITH_CODE(vddc < 2000, "Invalid VDDC value!", return -1); /* the voltage should not be zero nor equal to leakage ID */ if (vddc != 0 && vddc != virtual_voltage_id) { |