diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-09-20 05:31:07 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 15:14:35 -0400 |
commit | 0041e6007ecb45f4d48f5a445ace73c9196a5f82 (patch) | |
tree | df7b82d7c3f34a5362622389dc9351d8a281330c | |
parent | 515113f5e5835ee3ecb00d3da292ca67b5e7a972 (diff) |
drm/amd/powerplay: delete SMUM_WAIT_INDIRECT_FIELD
repeated defining in hwmgr.h
use PHM_WAIT_INDIRECT_FIELD instand.
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>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | 2 | ||||
-rw-r--r-- | 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 ebe988b3ecdb..cc67d225995f 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h | |||
@@ -151,17 +151,6 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr); | |||
151 | 151 | ||
152 | #define SMUM_FIELD_MASK(reg, field) reg##__##field##_MASK | 152 | #define SMUM_FIELD_MASK(reg, field) reg##__##field##_MASK |
153 | 153 | ||
154 | #define SMUM_WAIT_INDIRECT_REGISTER_GIVEN_INDEX(hwmgr, \ | ||
155 | port, index, value, mask) \ | ||
156 | smum_wait_on_indirect_register(hwmgr, \ | ||
157 | mm##port##_INDEX, index, value, mask) | ||
158 | |||
159 | #define SMUM_WAIT_INDIRECT_REGISTER(hwmgr, port, reg, value, mask) \ | ||
160 | SMUM_WAIT_INDIRECT_REGISTER_GIVEN_INDEX(hwmgr, port, ix##reg, value, mask) | ||
161 | |||
162 | #define SMUM_WAIT_INDIRECT_FIELD(hwmgr, port, reg, field, fieldval) \ | ||
163 | SMUM_WAIT_INDIRECT_REGISTER(hwmgr, port, reg, (fieldval) << SMUM_FIELD_SHIFT(reg, field), \ | ||
164 | SMUM_FIELD_MASK(reg, field) ) | ||
165 | 154 | ||
166 | #define SMUM_GET_FIELD(value, reg, field) \ | 155 | #define SMUM_GET_FIELD(value, reg, field) \ |
167 | (((value) & SMUM_FIELD_MASK(reg, field)) \ | 156 | (((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 bad9bf2bcb5a..9ee14315dce7 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c | |||
@@ -1938,7 +1938,7 @@ static int ci_start_smc(struct pp_hwmgr *hwmgr) | |||
1938 | 1938 | ||
1939 | PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMC_SYSCON_RESET_CNTL, rst_reg, 0); | 1939 | PHM_WRITE_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC, SMC_SYSCON_RESET_CNTL, rst_reg, 0); |
1940 | 1940 | ||
1941 | SMUM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS, | 1941 | PHM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS, |
1942 | INTERRUPTS_ENABLED, 1); | 1942 | INTERRUPTS_ENABLED, 1); |
1943 | 1943 | ||
1944 | return 0; | 1944 | 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 b729a393e588..78aa1122eacc 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) | |||
80 | /* de-assert reset */ | 80 | /* de-assert reset */ |
81 | iceland_start_smc(hwmgr); | 81 | iceland_start_smc(hwmgr); |
82 | 82 | ||
83 | SMUM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS, | 83 | PHM_WAIT_INDIRECT_FIELD(hwmgr, SMC_IND, FIRMWARE_FLAGS, |
84 | INTERRUPTS_ENABLED, 1); | 84 | INTERRUPTS_ENABLED, 1); |
85 | 85 | ||
86 | return 0; | 86 | return 0; |