drm/amd/powerplay: delete SMUM_READ_VFPF_INDIRECT_FIELD
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 20 Sep 2017 09:21:25 +0000 (17:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 19:14:33 +0000 (15:14 -0400)
repeated defining in hwmgr.h

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/inc/smumgr.h
drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c

index b1b2104..0bd4476 100644 (file)
@@ -179,10 +179,5 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
            SMUM_GET_FIELD(cgs_read_ind_register(device, port, ix##reg), \
                           reg, field)
 
-/*Operations on named fields.*/
-
-#define SMUM_READ_VFPF_INDIRECT_FIELD(device, port, reg, field) \
-               SMUM_GET_FIELD(cgs_read_ind_register(device, port, ix##reg), \
-                       reg, field)
 
 #endif
index 5c531eb..445829d 100644 (file)
@@ -188,7 +188,7 @@ static int ci_program_jump_on_start(struct pp_hwmgr *hwmgr)
 
 bool ci_is_smc_ram_running(struct pp_hwmgr *hwmgr)
 {
-       return ((0 == SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
+       return ((0 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
                        CGS_IND_REG__SMC, SMC_SYSCON_CLOCK_CNTL_0, ck_disable))
        && (0x20100 <= cgs_read_ind_register(hwmgr->device,
                        CGS_IND_REG__SMC, ixSMC_PC_C)));
index ee89fd7..5b25e06 100644 (file)
@@ -108,7 +108,7 @@ static int fiji_start_smu_in_protection_mode(struct pp_hwmgr *hwmgr)
                        SMU_STATUS, SMU_DONE, 0);
 
        /* Check pass/failed indicator */
-       if (SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
+       if (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
                        SMU_STATUS, SMU_PASS) != 1) {
                PP_ASSERT_WITH_CODE(false,
                                "SMU Firmware start failed!", return -1);
@@ -304,7 +304,7 @@ static int fiji_start_smu(struct pp_hwmgr *hwmgr)
                fiji_avfs_event_mgr(hwmgr, false);
 
                /* Check if SMU is running in protected mode */
-               if (0 == SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
+               if (0 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
                                CGS_IND_REG__SMC,
                                SMU_FIRMWARE, SMU_MODE)) {
                        result = fiji_start_smu_in_non_protection_mode(hwmgr);
index eefa13b..22b8ecb 100644 (file)
@@ -252,7 +252,7 @@ static int polaris10_start_smu_in_protection_mode(struct pp_hwmgr *hwmgr)
 
        PHM_WAIT_VFPF_INDIRECT_FIELD_UNEQUAL(hwmgr, SMC_IND, SMU_STATUS, SMU_DONE, 0);
 
-       if (1 != SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
+       if (1 != PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
                                                SMU_STATUS, SMU_PASS))
                PP_ASSERT_WITH_CODE(false, "SMU Firmware start failed!", return -1);
 
@@ -316,8 +316,8 @@ static int polaris10_start_smu(struct pp_hwmgr *hwmgr)
        /* Only start SMC if SMC RAM is not running */
        if (!smu7_is_smc_ram_running(hwmgr)) {
                SMU_VFT_INTACT = false;
-               smu_data->protected_mode = (uint8_t) (SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMU_FIRMWARE, SMU_MODE));
-               smu_data->smu7_data.security_hard_key = (uint8_t) (SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMU_FIRMWARE, SMU_SEL));
+               smu_data->protected_mode = (uint8_t) (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMU_FIRMWARE, SMU_MODE));
+               smu_data->smu7_data.security_hard_key = (uint8_t) (PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMU_FIRMWARE, SMU_SEL));
 
                /* Check if SMU is running in protected mode */
                if (smu_data->protected_mode == 0) {
index af5c4d3..89e2464 100644 (file)
@@ -158,7 +158,7 @@ int smu7_program_jump_on_start(struct pp_hwmgr *hwmgr)
 
 bool smu7_is_smc_ram_running(struct pp_hwmgr *hwmgr)
 {
-       return ((0 == SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMC_SYSCON_CLOCK_CNTL_0, ck_disable))
+       return ((0 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMC_SYSCON_CLOCK_CNTL_0, ck_disable))
        && (0x20100 <= cgs_read_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixSMC_PC_C)));
 }
 
index 7ffcada..d22cf21 100644 (file)
@@ -82,7 +82,7 @@ static int tonga_start_in_protection_mode(struct pp_hwmgr *hwmgr)
                SMU_STATUS, SMU_DONE, 0);
 
        /* Check pass/failed indicator */
-       if (1 != SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
+       if (1 != PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device,
                                CGS_IND_REG__SMC, SMU_STATUS, SMU_PASS)) {
                pr_err("SMU Firmware start failed\n");
                return -EINVAL;
@@ -143,7 +143,7 @@ static int tonga_start_smu(struct pp_hwmgr *hwmgr)
        if (!(smu7_is_smc_ram_running(hwmgr) ||
                cgs_is_virtualization_enabled(hwmgr->device))) {
                /*Check if SMU is running in protected mode*/
-               if (0 == SMUM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
+               if (0 == PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,
                                        SMU_FIRMWARE, SMU_MODE)) {
                        result = tonga_start_in_non_protection_mode(hwmgr);
                        if (result)