[PATCH 1/6] drm/amd/powerplay: incorrectly use of the function return value

Rex Zhu Rex.Zhu at amd.com
Tue Jul 5 09:48:49 UTC 2016


'0' means true.

Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Change-Id: I04510f8c726a57fc4a7867954cfb2f4fba659150
---
 drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
index 94d6b47..6d9d9ed 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
@@ -302,7 +302,7 @@ static int init_dpm_2_parameters(
 			(((unsigned long)powerplay_table) + le16_to_cpu(powerplay_table->usPPMTableOffset));
 
 		if (0 != powerplay_table->usPPMTableOffset) {
-			if (1 == get_platform_power_management_table(hwmgr, atom_ppm_table)) {
+			if (0 == get_platform_power_management_table(hwmgr, atom_ppm_table)) {
 				phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 					PHM_PlatformCaps_EnablePlatformPowerManagement);
 			}
-- 
1.9.1



More information about the amd-gfx mailing list