]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V
authorMoritz Kühner <kuehner.moritz@gmail.com>
Sun, 17 Apr 2016 14:15:23 +0000 (16:15 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:30:24 +0000 (20:30 -0400)
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>
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c

index 28f5c65b7b4e1f1c1ab53af47e5a2eae301e60e4..59dd78c055969be3fc79f5907e01b370c1bebea8 100644 (file)
@@ -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) {