drm/amdgpu: Don't warn for unsupported set_xgmi_plpd_mode
Subsystems (2)
PATCH 1/1 drm/amdgpu: Don't warn for unsupported set_xgmi_plpd_mode
set_xgmi_plpd_mode may be unsupported and this isn't error, no need to print warning for it.
Suggested-by [email protected]
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +4 -2
@@ -1138,7 +1138,8 @@ static int amdgpu_ras_error_inject_xgmi(struct amdgpu_device *adev,if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_DISALLOW ))dev_warn (adev->dev,"Failed to disallow df cstate" ); -if (amdgpu_dpm_set_xgmi_plpd_mode (adev,XGMI_PLPD_DISALLOW )) + ret =amdgpu_dpm_set_xgmi_plpd_mode (adev,XGMI_PLPD_DISALLOW ); +if (ret && ret != -EOPNOTSUPP )dev_warn (adev->dev,"Failed to disallow XGMI power down" ); ret =psp_ras_trigger_error (&adev->psp, block_info, instance_mask);
@@ -1146,7 +1147,8 @@ static int amdgpu_ras_error_inject_xgmi(struct amdgpu_device *adev,if (amdgpu_ras_intr_triggered ())return ret; -if (amdgpu_dpm_set_xgmi_plpd_mode (adev,XGMI_PLPD_DEFAULT )) + ret =amdgpu_dpm_set_xgmi_plpd_mode (adev,XGMI_PLPD_DEFAULT ); +if (ret && ret != -EOPNOTSUPP )dev_warn (adev->dev,"Failed to allow XGMI power down" );if (amdgpu_dpm_set_df_cstate (adev,DF_CSTATE_ALLOW ))
Signature · 1 line
2.35.1
[AMD Official Use Only - General]
Reviewed-by Stanley.Yang <[email protected]>
Regards,
Stanley
Quoted 50 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Tuesday, October 31, 2023 3:08 PM
To: [email protected]
Cc: Lazar, Lijo <[email protected]>; Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: Don't warn for unsupportedset_xgmi_plpd_mode
set_xgmi_plpd_modemay be unsupported and this isn't error, no need to print warning for it.Suggested-by [email protected]Signed-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +2
-1@@ -1138,7 +1138,8 @@ static int amdgpu_ras_error_inject_xgmi(structamdgpu_device *adev, if (amdgpu_dpm_set_df_cstate(adev, DF_CSTATE_DISALLOW)) dev_warn(adev->dev, "Failed to disallow df cstate"); - if (amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DISALLOW)) + ret = amdgpu_dpm_set_xgmi_plpd_mode(adev,XGMI_PLPD_DISALLOW ); +if (ret && ret != -EOPNOTSUPP )dev_warn(adev->dev, "Failed to disallow XGMI power down"); ret = psp_ras_trigger_error(&adev->psp, block_info, instance_mask);drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +2
-1@@ -1146,7 +1147,8 @@ static int amdgpu_ras_error_inject_xgmi(structamdgpu_device *adev, if (amdgpu_ras_intr_triggered()) return ret; - if (amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DEFAULT)) + ret = amdgpu_dpm_set_xgmi_plpd_mode(adev,XGMI_PLPD_DEFAULT ); +if (ret && ret != -EOPNOTSUPP )dev_warn (adev->dev,"Failed to allow XGMI power down" );if (
amdgpu_dpm_set_df_cstate(adev, DF_CSTATE_ALLOW))
--
2.35.1