drm/amd/pm: fix gpu reset failure by MP1 state setting
Subsystems (3)
PATCH 1/1 drm/amd/pm: fix gpu reset failure by MP1 state setting
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 <[email protected]>
Signed-off-by Guchun Chen <[email protected]>
--- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 --- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +0 -3
@@ -1027,9 +1027,6 @@ int amdgpu_dpm_set_mp1_state(struct amdgpu_device *adev,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,
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +7 -3
@@ -3113,14 +3113,18 @@ static int sienna_cichlid_system_features_control(struct smu_context *smu,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 = {
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Thanks! Reviewed-by: Evan Quan <[email protected]>
-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: Tuesday, March 23, 2021 1:50 PM
To: [email protected]; Lazar, Lijo <[email protected]>; Chen, Jiansong (Simon) <[email protected]>; Quan, Evan <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amd/pm: fix gpu reset failure by MP1 state setting
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 <[email protected]>
Signed-off-by Guchun Chen <[email protected]>
--- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 --- .../gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +0 -3
@@ -1027,9 +1027,6 @@ int amdgpu_dpm_set_mp1_state(struct amdgpu_device *adev,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,
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +7 -3
@@ -3113,14 +3113,18 @@ static int sienna_cichlid_system_features_control(struct smu_context *smu,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 = {
Signature · 5 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx