Skip to content

Commit 61d7052

Browse files
Tao Zhoualexdeucher
authored andcommitted
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. v2: add ret2 to save the status of psp_ras_trigger_error. Suggested-by: [email protected] Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 17daf01 commit 61d7052

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,28 +1125,30 @@ static void amdgpu_xgmi_query_ras_error_count(struct amdgpu_device *adev,
11251125
static int amdgpu_ras_error_inject_xgmi(struct amdgpu_device *adev,
11261126
void *inject_if, uint32_t instance_mask)
11271127
{
1128-
int ret = 0;
1128+
int ret1, ret2;
11291129
struct ta_ras_trigger_error_input *block_info =
11301130
(struct ta_ras_trigger_error_input *)inject_if;
11311131

11321132
if (amdgpu_dpm_set_df_cstate(adev, DF_CSTATE_DISALLOW))
11331133
dev_warn(adev->dev, "Failed to disallow df cstate");
11341134

1135-
if (amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DISALLOW))
1135+
ret1 = amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DISALLOW);
1136+
if (ret1 && ret1 != -EOPNOTSUPP)
11361137
dev_warn(adev->dev, "Failed to disallow XGMI power down");
11371138

1138-
ret = psp_ras_trigger_error(&adev->psp, block_info, instance_mask);
1139+
ret2 = psp_ras_trigger_error(&adev->psp, block_info, instance_mask);
11391140

11401141
if (amdgpu_ras_intr_triggered())
1141-
return ret;
1142+
return ret2;
11421143

1143-
if (amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DEFAULT))
1144+
ret1 = amdgpu_dpm_set_xgmi_plpd_mode(adev, XGMI_PLPD_DEFAULT);
1145+
if (ret1 && ret1 != -EOPNOTSUPP)
11441146
dev_warn(adev->dev, "Failed to allow XGMI power down");
11451147

11461148
if (amdgpu_dpm_set_df_cstate(adev, DF_CSTATE_ALLOW))
11471149
dev_warn(adev->dev, "Failed to allow df cstate");
11481150

1149-
return ret;
1151+
return ret2;
11501152
}
11511153

11521154
struct amdgpu_ras_block_hw_ops xgmi_ras_hw_ops = {

0 commit comments

Comments
 (0)