提交 98b0333d 编写于 作者: Y YiPeng Chai 提交者: Jialin Zhang

drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini

stable inclusion
from stable-v5.10.143
commit c19656cd951a822c0b0f23c91fde08cf313a52ed
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0U6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c19656cd951a822c0b0f23c91fde08cf313a52ed

--------------------------------

[ Upstream commit 9d705d77 ]

V1:
The amdgpu_xgmi_remove_device function will send unload command
to psp through psp ring to terminate xgmi, but psp ring has been
destroyed in psp_hw_fini.

V2:
1. Change the commit title.
2. Restore amdgpu_xgmi_remove_device to its original calling location.
   Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to
   psp_hw_fini.
Signed-off-by: NYiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8ff17a4d
...@@ -2146,6 +2146,9 @@ static int psp_hw_fini(void *handle) ...@@ -2146,6 +2146,9 @@ static int psp_hw_fini(void *handle)
psp_rap_terminate(psp); psp_rap_terminate(psp);
psp_dtm_terminate(psp); psp_dtm_terminate(psp);
psp_hdcp_terminate(psp); psp_hdcp_terminate(psp);
if (adev->gmc.xgmi.num_physical_nodes > 1)
psp_xgmi_terminate(psp);
} }
psp_asd_unload(psp); psp_asd_unload(psp);
......
...@@ -622,7 +622,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev) ...@@ -622,7 +622,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
amdgpu_put_xgmi_hive(hive); amdgpu_put_xgmi_hive(hive);
} }
return psp_xgmi_terminate(&adev->psp); return 0;
} }
int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev) int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册