Commit 326f0672 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: correct smu 13.0.0/7 mp1 state setup

Only PP_MP1_STATE_UNLOAD is supported for now. For other mp1 state, we
should just ignore it. Otherwise, there will be errors coming out.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 25dfc8fa
...@@ -1763,6 +1763,23 @@ static void smu_v13_0_0_i2c_control_fini(struct smu_context *smu) ...@@ -1763,6 +1763,23 @@ static void smu_v13_0_0_i2c_control_fini(struct smu_context *smu)
adev->pm.fru_eeprom_i2c_bus = NULL; adev->pm.fru_eeprom_i2c_bus = NULL;
} }
static int smu_v13_0_0_set_mp1_state(struct smu_context *smu,
enum pp_mp1_state mp1_state)
{
int ret;
switch (mp1_state) {
case PP_MP1_STATE_UNLOAD:
ret = smu_cmn_set_mp1_state(smu, mp1_state);
break;
default:
/* Ignore others */
ret = 0;
}
return ret;
}
static const struct pptable_funcs smu_v13_0_0_ppt_funcs = { static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
.get_allowed_feature_mask = smu_v13_0_0_get_allowed_feature_mask, .get_allowed_feature_mask = smu_v13_0_0_get_allowed_feature_mask,
.set_default_dpm_table = smu_v13_0_0_set_default_dpm_table, .set_default_dpm_table = smu_v13_0_0_set_default_dpm_table,
...@@ -1829,7 +1846,7 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = { ...@@ -1829,7 +1846,7 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
.baco_exit = smu_v13_0_baco_exit, .baco_exit = smu_v13_0_baco_exit,
.mode1_reset_is_support = smu_v13_0_0_is_mode1_reset_supported, .mode1_reset_is_support = smu_v13_0_0_is_mode1_reset_supported,
.mode1_reset = smu_v13_0_mode1_reset, .mode1_reset = smu_v13_0_mode1_reset,
.set_mp1_state = smu_cmn_set_mp1_state, .set_mp1_state = smu_v13_0_0_set_mp1_state,
}; };
void smu_v13_0_0_set_ppt_funcs(struct smu_context *smu) void smu_v13_0_0_set_ppt_funcs(struct smu_context *smu)
......
...@@ -1550,6 +1550,23 @@ static int smu_v13_0_7_set_power_profile_mode(struct smu_context *smu, long *inp ...@@ -1550,6 +1550,23 @@ static int smu_v13_0_7_set_power_profile_mode(struct smu_context *smu, long *inp
return ret; return ret;
} }
static int smu_v13_0_7_set_mp1_state(struct smu_context *smu,
enum pp_mp1_state mp1_state)
{
int ret;
switch (mp1_state) {
case PP_MP1_STATE_UNLOAD:
ret = smu_cmn_set_mp1_state(smu, mp1_state);
break;
default:
/* Ignore others */
ret = 0;
}
return ret;
}
static const struct pptable_funcs smu_v13_0_7_ppt_funcs = { static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
.get_allowed_feature_mask = smu_v13_0_7_get_allowed_feature_mask, .get_allowed_feature_mask = smu_v13_0_7_get_allowed_feature_mask,
.set_default_dpm_table = smu_v13_0_7_set_default_dpm_table, .set_default_dpm_table = smu_v13_0_7_set_default_dpm_table,
...@@ -1607,7 +1624,7 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = { ...@@ -1607,7 +1624,7 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
.baco_set_state = smu_v13_0_baco_set_state, .baco_set_state = smu_v13_0_baco_set_state,
.baco_enter = smu_v13_0_baco_enter, .baco_enter = smu_v13_0_baco_enter,
.baco_exit = smu_v13_0_baco_exit, .baco_exit = smu_v13_0_baco_exit,
.set_mp1_state = smu_cmn_set_mp1_state, .set_mp1_state = smu_v13_0_7_set_mp1_state,
}; };
void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu) void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment