drm/amdgpu: Disable GPU reset on SRIOV before remove pci.
Subsystems (2)
PATCH 1/1 drm/amdgpu: Disable GPU reset on SRIOV before remove pci.
for smu v13_0_2")
The change of the commit f5c7e7797060 ("Adjust removal control flow for smu v13_0_2") brought a bug on SRIOV envrionment. It caused unloading amdgpu failed on Guest VM. The reason is that the VF FLR was requested while unloading amdgpu driver, but the VF FLR of SRIOV sequence is wrong while removing PCI device.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
@@ -2187,7 +2187,8 @@ amdgpu_pci_remove(struct pci_dev *pdev)pm_runtime_forbid (dev->dev); } -if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,2 )) { +if ((adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,2 )) && + !amdgpu_sriov_vf (adev)) {bool need_to_reset_gpu = false;if (adev->gmc.xgmi.num_physical_nodes >1 ) {
Signature · 1 line
2.34.1
Quoted 9 lines · Gavin Wan
Fixes f5c7e7797060 ("drm/amdgpu: Adjust removal control flowfor smu v13_0_2")The change of the commit
f5c7e7797060("Adjust removal control flow for smuv13_0_2") brought a bug on SRIOV envrionment. It caused unloading amdgpu failed on Guest VM. The reason is that the VF FLR was requested while unloading amdgpu driver, but the VF FLR of SRIOV sequence is wrong while removing PCI device.
Please move the Fixes line down below the patch description and above the Signed-off-by/Reviewed-by/Acked-by/etc. tags. Feel free to add:
Thanks,
Alex
Quoted 24 lines
Signed-off-by Gavin Wan <[email protected]>Change-Id I1ff8dcbffd85d7f3d8267d660fd8292423d2f70f--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-2@@ -2187,7 +2187,8 @@ amdgpu_pci_remove(struct pci_dev *pdev)pm_runtime_forbid (dev->dev); } -if (adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,2 )) { +if ((adev->ip_versions[MP1_HWIP ][0 ] ==IP_VERSION (13 ,0 ,2 )) && + !amdgpu_sriov_vf (adev)) {bool need_to_reset_gpu = false;if (adev->gmc.xgmi.num_physical_nodes >1 ) { --2.34.1