[PATCH 1/2 v2] drm/amd/powerplay/hwmgr: prevent VDDC from exceeding 2V

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 3 +--
 1 file changed, 1 insertion(+), 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 0d5d837..50afb02 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
@@ -455,8 +455,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) {
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux