]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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 b1b2104453c82b491fa9b9617d733244919ca924..0bd4476106bf0c30380d98877cf4b1b4affd5eba 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 5c531eb96648ae68b9adec3ffb5625b6ad924ce7..445829d329d0375a052b0d68f33e4009d69810d5 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 ee89fd7c8342944fa0187b33fdda9f1aadb1d096..5b25e067b2f1dc724520ee4ea339a760426a5345 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 eefa13ba4eaf263ae248d2b19f14c93275140dcb..22b8ecbf7fce8f60b9b49f437f4b4fecb49213ec 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 af5c4d30cf3e796314c41ba20bd87daad1153567..89e2464860f075ebc1617a0869a1e06f02a29598 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 7ffcadaa1a53700d6b8705d1a8bed5ebbce42261..d22cf218cf187c25ff10842eee0ad99c6e361c15 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)