drm/amdgpu: Disable GPU reset on SRIOV before remove pci.
authorGavin Wan <Gavin.Wan@amd.com>
Wed, 26 Oct 2022 17:45:25 +0000 (13:45 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Nov 2022 15:44:49 +0000 (11:44 -0400)
commit2103c42198d38d6c02f8b9720c2a19cf3b4adddd
treedc55e1c4a05a539b96a0ed61a6dd6e51eb43d1a1
parent9d1b073d018bcb1701a00cc3d4b8c6998cc34a4e
drm/amdgpu: Disable GPU reset on SRIOV before remove pci.

The recent change 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.

For SRIOV, the guest driver should not trigger the whole XGMI hive
to do the reset. Host driver control how the device been reset.

Fixes: f5c7e7797060 ("drm/amdgpu: Adjust removal control flow for smu v13_0_2")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Signed-off-by: Gavin Wan <Gavin.Wan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c