Instead of blocking varied unsupported MP1 state in upper level,
defer and skip such MP1 state handling in specific ASIC.
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
int ret = 0;
const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
- if (mp1_state == PP_MP1_STATE_NONE)
- return 0;
-
if (pp_funcs && pp_funcs->set_mp1_state) {
ret = pp_funcs->set_mp1_state(
adev->powerplay.pp_handle,
static int sienna_cichlid_set_mp1_state(struct smu_context *smu,
enum pp_mp1_state mp1_state)
{
+ int ret;
+
switch (mp1_state) {
case PP_MP1_STATE_UNLOAD:
- return smu_cmn_set_mp1_state(smu, mp1_state);
+ ret = smu_cmn_set_mp1_state(smu, mp1_state);
+ break;
default:
- return -EINVAL;
+ /* Ignore others */
+ ret = 0;
}
- return 0;
+ return ret;
}
static const struct pptable_funcs sienna_cichlid_ppt_funcs = {