[PATCH 16/18] drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD

Rex Zhu Rex.Zhu at amd.com
Wed Sep 20 11:44:16 UTC 2017


repeated defining in hwmgr.h
use PHM_WAIT_INDIRECT_FIELD instand.

Change-Id: I4c06638c4fb2af2bae18a0c0f4f825b555f2bea3
Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
---
 drivers/gpu/drm/amd/powerplay/inc/smumgr.h            | 11 -----------
 drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c         |  2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c |  2 +-
 3 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
index ebe988b..cc67d225 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
@@ -151,17 +151,6 @@ extern int smum_populate_requested_graphic_levels(struct pp_hwmgr *hwmgr,
 
 #define SMUM_FIELD_MASK(reg, field) reg##__##field##_MASK
 
-#define SMUM_WAIT_INDIRECT_REGISTER_GIVEN_INDEX(hwmgr,			\
-					port, index, value, mask)	\
-	smum_wait_on_indirect_register(hwmgr,				\
-				mm##port##_INDEX, index, value, mask)
-
-#define SMUM_WAIT_INDIRECT_REGISTER(hwmgr, port, reg, value, mask)    \
-	    SMUM_WAIT_INDIRECT_REGISTER_GIVEN_INDEX(hwmgr, port, ix##reg, value, mask)
-
-#define SMUM_WAIT_INDIRECT_FIELD(hwmgr, port, reg, field, fieldval)                          \
-	    SMUM_WAIT_INDIRECT_REGISTER(hwmgr, port, reg, (fieldval) << SMUM_FIELD_SHIFT(reg, field), \
-			            SMUM_FIELD_MASK(reg, field) )
 
 #define SMUM_GET_FIELD(value, reg, field)				\
 		(((value) & SMUM_FIELD_MASK(reg, field))		\
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
index b922de5..7709f62 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
@@ -1937,7 +1937,7 @@ static int ci_start_smc(struct pp_hwmgr *hwmgr)
 
 	PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMC_SYSCON_RESET_CNTL, rst_reg, 0);
 
-	SMUM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS,
+	PHM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS,
 				 INTERRUPTS_ENABLED, 1);
 
 	return 0;
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
index b729a39..78aa112 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
@@ -80,7 +80,7 @@ static int iceland_smu_start_smc(struct pp_hwmgr *hwmgr)
 	/* de-assert reset */
 	iceland_start_smc(hwmgr);
 
-	SMUM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS,
+	PHM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS,
 				 INTERRUPTS_ENABLED, 1);
 
 	return 0;
-- 
1.9.1



More information about the amd-gfx mailing list