mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/amd/pm: Add message control for SMUv12
Initialize smu message control in SMUv12 SOCs. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6d74c9ff6a
commit
067e46a36b
|
|
@ -62,5 +62,8 @@ int smu_v12_0_set_driver_table_location(struct smu_context *smu);
|
|||
|
||||
int smu_v12_0_get_vbios_bootup_values(struct smu_context *smu);
|
||||
|
||||
void smu_v12_0_init_msg_ctl(struct smu_context *smu,
|
||||
const struct cmn2asic_msg_mapping *message_map);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1507,4 +1507,5 @@ void renoir_set_ppt_funcs(struct smu_context *smu)
|
|||
smu->param_reg = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_82);
|
||||
smu->msg_reg = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_66);
|
||||
smu->resp_reg = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_90);
|
||||
smu_v12_0_init_msg_ctl(smu, renoir_message_map);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -405,3 +405,20 @@ int smu_v12_0_get_vbios_bootup_values(struct smu_context *smu)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void smu_v12_0_init_msg_ctl(struct smu_context *smu,
|
||||
const struct cmn2asic_msg_mapping *message_map)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
struct smu_msg_ctl *ctl = &smu->msg_ctl;
|
||||
|
||||
ctl->smu = smu;
|
||||
mutex_init(&ctl->lock);
|
||||
ctl->config.msg_reg = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_66);
|
||||
ctl->config.resp_reg = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_90);
|
||||
ctl->config.arg_regs[0] = SOC15_REG_OFFSET(MP1, 0, mmMP1_SMN_C2PMSG_82);
|
||||
ctl->config.num_arg_regs = 1;
|
||||
ctl->ops = &smu_msg_v1_ops;
|
||||
ctl->default_timeout = adev->usec_timeout * 20;
|
||||
ctl->message_map = message_map;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user