Skip to content

Commit

Permalink
drm/amd/powerplay: delete SMUM_READ_FIELD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rex Zhu authored and Alex Deucher committed Sep 26, 2017
1 parent 9517586 commit 515113f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/powerplay/inc/smumgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
(((value) & SMUM_FIELD_MASK(reg, field)) \
>> SMUM_FIELD_SHIFT(reg, field))

#define SMUM_READ_FIELD(device, reg, field) \
SMUM_GET_FIELD(cgs_read_register(device, mm##reg), reg, field)

#define SMUM_READ_INDIRECT_FIELD(device, port, reg, field) \
SMUM_GET_FIELD(cgs_read_ind_register(device, port, ix##reg), \
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int ci_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)

PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);

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

if (ret != 1)
pr_info("\n failed to send message %x ret is %d\n", msg, ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ static int polaris10_populate_single_memory_level(struct pp_hwmgr *hwmgr,

if (mclk_stutter_mode_threshold &&
(clock <= mclk_stutter_mode_threshold) &&
(SMUM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL,
(PHM_READ_FIELD(hwmgr->device, DPG_PIPE_STUTTER_CONTROL,
STUTTER_ENABLE) & 0x1))
mem_level->StutterEnable = true;

Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ int smu7_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg)

PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);

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

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

PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);

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

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

PHM_WAIT_FIELD_UNEQUAL(hwmgr, SMC_RESP_0, SMC_RESP, 0);

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

return 0;
Expand Down

0 comments on commit 515113f

Please sign in to comment.