Skip to content

Commit

Permalink
drm/amdgpu/pp: switch smu callback type for get_argument()
Browse files Browse the repository at this point in the history
return a uint32_t rather than an int to properly reflect
what the function does.

Reviewed-by: Rex Zhu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
alexdeucher committed Jul 16, 2018
1 parent ce7577a commit 59f20f5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ struct pp_smumgr_func {
int (*request_smu_load_fw)(struct pp_hwmgr *hwmgr);
int (*request_smu_load_specific_fw)(struct pp_hwmgr *hwmgr,
uint32_t firmware);
int (*get_argument)(struct pp_hwmgr *hwmgr);
uint32_t (*get_argument)(struct pp_hwmgr *hwmgr);
int (*send_msg_to_smc)(struct pp_hwmgr *hwmgr, uint16_t msg);
int (*send_msg_to_smc_with_parameter)(struct pp_hwmgr *hwmgr,
uint16_t msg, uint32_t parameter);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/inc/smumgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ enum SMU10_TABLE_ID {
SMU10_CLOCKTABLE,
};

extern int smum_get_argument(struct pp_hwmgr *hwmgr);
extern uint32_t smum_get_argument(struct pp_hwmgr *hwmgr);

extern int smum_download_powerplay_table(struct pp_hwmgr *hwmgr, void **table);

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int smu10_send_msg_to_smc_without_waiting(struct pp_hwmgr *hwmgr,
return 0;
}

static int smu10_read_arg_from_smc(struct pp_hwmgr *hwmgr)
static uint32_t smu10_read_arg_from_smc(struct pp_hwmgr *hwmgr)
{
struct amdgpu_device *adev = hwmgr->adev;

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ static const enum smu8_scratch_entry firmware_list[] = {
SMU8_SCRATCH_ENTRY_UCODE_ID_RLC_G,
};

static int smu8_get_argument(struct pp_hwmgr *hwmgr)
static uint32_t smu8_get_argument(struct pp_hwmgr *hwmgr)
{
if (hwmgr == NULL || hwmgr->device == NULL)
return -EINVAL;
return 0;

return cgs_read_register(hwmgr->device,
mmSMU_MP1_SRBM2P_ARG_0);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/smu9_smumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int smu9_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
return 0;
}

int smu9_get_argument(struct pp_hwmgr *hwmgr)
uint32_t smu9_get_argument(struct pp_hwmgr *hwmgr)
{
struct amdgpu_device *adev = hwmgr->adev;

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/smu9_smumgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ bool smu9_is_smc_ram_running(struct pp_hwmgr *hwmgr);
int smu9_send_msg_to_smc(struct pp_hwmgr *hwmgr, uint16_t msg);
int smu9_send_msg_to_smc_with_parameter(struct pp_hwmgr *hwmgr,
uint16_t msg, uint32_t parameter);
int smu9_get_argument(struct pp_hwmgr *hwmgr);
uint32_t smu9_get_argument(struct pp_hwmgr *hwmgr);

#endif
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int smum_process_firmware_header(struct pp_hwmgr *hwmgr)
return 0;
}

int smum_get_argument(struct pp_hwmgr *hwmgr)
uint32_t smum_get_argument(struct pp_hwmgr *hwmgr)
{
if (NULL != hwmgr->smumgr_funcs->get_argument)
return hwmgr->smumgr_funcs->get_argument(hwmgr);
Expand Down

0 comments on commit 59f20f5

Please sign in to comment.