Skip to content

Commit 515113f

Browse files
Rex Zhualexdeucher
authored andcommitted
drm/amd/powerplay: delete SMUM_READ_FIELD
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>
1 parent 9517586 commit 515113f

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

drivers/gpu/drm/amd/powerplay/inc/smumgr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
167167
(((value) & SMUM_FIELD_MASK(reg, field)) \
168168
>> SMUM_FIELD_SHIFT(reg, field))
169169

170-
#define SMUM_READ_FIELD(device, reg, field) \
171-
SMUM_GET_FIELD(cgs_read_register(device, mm##reg), reg, field)
172170

173171
#define SMUM_READ_INDIRECT_FIELD(device, port, reg, field) \
174172
SMUM_GET_FIELD(cgs_read_ind_register(device, port, ix##reg), \

drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ int ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
219219

220220
PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);
221221

222-
ret = SMUM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
222+
ret = PHM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
223223

224224
if (ret != 1)
225225
pr_info("\n failed to send message %x ret is %d\n", msg, ret);

drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ static int polaris10_populate_single_memory_level(struct pp_hwmgr *hwmgr,
866866

867867
if (mclk_stutter_mode_threshold &&
868868
(clock <= mclk_stutter_mode_threshold) &&
869-
(SMUM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL,
869+
(PHM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL,
870870
STUTTER_ENABLE) & 0x1))
871871
mem_level->StutterEnable = true;
872872

drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ int smu7_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
172172

173173
PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);
174174

175-
ret = SMUM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
175+
ret = PHM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
176176

177177
if (ret != 1)
178178
pr_info("\n failed to send pre message %x ret is %d \n", msg, ret);
@@ -181,7 +181,7 @@ int smu7_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)
181181

182182
PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);
183183

184-
ret = SMUM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
184+
ret = PHM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP);
185185

186186
if (ret != 1)
187187
pr_info("\n failed to send message %x ret is %d \n", msg, ret);
@@ -224,7 +224,7 @@ int smu7_send_msg_to_smc_offset(struct pp_hwmgr *hwmgr)
224224

225225
PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);
226226

227-
if (1 != SMUM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP))
227+
if (1 != PHM_READ_FIELD(hwmgr->device, SMC_RESP_0, SMC_RESP))
228228
pr_info("Failed to send Message.\n");
229229

230230
return 0;

0 commit comments

Comments
 (0)