aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1041-drm-amd-powerplay-hwmgr-prevent-VDDC-from-exceeding-.patch
blob: e30ff922e24360ad9029db6a39f8bc844aabced3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 3a81868dcafd1b133fe5136440da80eac463a3b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Moritz=20K=C3=BChner?= <kuehner.moritz@gmail.com>
Date: Sun, 17 Apr 2016 16:15:23 +0200
Subject: [PATCH 1041/1110] drm/amd/powerplay/hwmgr: prevent VDDC from
 exceeding 2V
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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 | 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 28f5c65..59dd78c 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) {
-- 
2.7.4