mirror of
https://github.com/torvalds/linux.git
synced 2026-05-01 04:52:32 -04:00
drm/amd/pm: Add LightSBR SMU MSG support
This new MSG provide the interface for driver to enable/disable the Light Secondary Bus Reset support from SMU. When enabled, SMU will only do minimum NBIO response to the SBR request and leave the real HW reset to be handled by driver later. When disabled (default state),SMU will pass the request to PSP for a HW reset Signed-off-by: shaoyunl <shaoyun.liu@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -2972,6 +2972,19 @@ int smu_gfx_state_change_set(struct smu_context *smu, uint32_t state)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int smu_set_light_sbr(struct smu_context *smu, bool enable)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
mutex_lock(&smu->mutex);
|
||||
if (smu->ppt_funcs->set_light_sbr)
|
||||
ret = smu->ppt_funcs->set_light_sbr(smu, enable);
|
||||
mutex_unlock(&smu->mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static const struct amd_pm_funcs swsmu_pm_funcs = {
|
||||
/* export for sysfs */
|
||||
.set_fan_control_mode = smu_pp_set_fan_control_mode,
|
||||
|
||||
@@ -142,6 +142,7 @@ static const struct cmn2asic_msg_mapping arcturus_message_map[SMU_MSG_MAX_COUNT]
|
||||
MSG_MAP(GmiPwrDnControl, PPSMC_MSG_GmiPwrDnControl, 0),
|
||||
MSG_MAP(ReadSerialNumTop32, PPSMC_MSG_ReadSerialNumTop32, 1),
|
||||
MSG_MAP(ReadSerialNumBottom32, PPSMC_MSG_ReadSerialNumBottom32, 1),
|
||||
MSG_MAP(LightSBR, PPSMC_MSG_LightSBR, 0),
|
||||
};
|
||||
|
||||
static const struct cmn2asic_mapping arcturus_clk_map[SMU_CLK_COUNT] = {
|
||||
@@ -2363,6 +2364,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
|
||||
.deep_sleep_control = smu_v11_0_deep_sleep_control,
|
||||
.get_fan_parameters = arcturus_get_fan_parameters,
|
||||
.interrupt_work = smu_v11_0_interrupt_work,
|
||||
.set_light_sbr = smu_v11_0_set_light_sbr,
|
||||
};
|
||||
|
||||
void arcturus_set_ppt_funcs(struct smu_context *smu)
|
||||
|
||||
@@ -1603,6 +1603,16 @@ int smu_v11_0_mode1_reset(struct smu_context *smu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int smu_v11_0_set_light_sbr(struct smu_context *smu, bool enable)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_LightSBR, enable ? 1 : 0, NULL);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int smu_v11_0_get_dpm_ultimate_freq(struct smu_context *smu, enum smu_clk_type clk_type,
|
||||
uint32_t *min, uint32_t *max)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user