[PATCH] drm/amdgpu: remove evict_resource for sriov when suspend.
Shikang Fan
shikang.fan at amd.com
Mon Dec 5 08:47:36 UTC 2022
- There is no need to evict resources from vram to sram for sriov
because GPU is still powered on. And evicet is taking too much time
that would cause full access mode timedout in multi-vf mode.
Signed-off-by: Shikang Fan <shikang.fan at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 818fa72c670d..55fe425fbe6d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4135,9 +4135,11 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
if (!adev->in_s0ix)
amdgpu_amdkfd_suspend(adev, adev->in_runpm);
- r = amdgpu_device_evict_resources(adev);
- if (r)
- return r;
+ if (!amdgpu_sriov_vf(adev)) {
+ r = amdgpu_device_evict_resources(adev);
+ if (r)
+ return r;
+ }
amdgpu_fence_driver_hw_fini(adev);
--
2.25.1
More information about the amd-gfx
mailing list