diff options
author | Shikang Fan <shikang.fan@amd.com> | 2022-12-08 12:53:14 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-12-13 23:10:32 +0100 |
commit | 47ea20762bb7875a62e10433a3cd5d34e9133f47 (patch) | |
tree | 8faa880f652b1852df3063e53e8e82a97a988fb7 /drivers/gpu | |
parent | drm/amdgpu: handle polaris10/11 overlap asics (v2) (diff) | |
download | linux-47ea20762bb7875a62e10433a3cd5d34e9133f47.tar.xz linux-47ea20762bb7875a62e10433a3cd5d34e9133f47.zip |
drm/amdgpu: Add an extra evict_resource call during device_suspend.
- evict_resource is taking too long causing sriov full access mode timeout.
So, add an extra evict_resource in the beginning as an early evict.
Signed-off-by: Shikang Fan <shikang.fan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index cfa411c12072..64660a41d53c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4112,6 +4112,11 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) adev->in_suspend = true; + /* Evict the majority of BOs before grabbing the full access */ + r = amdgpu_device_evict_resources(adev); + if (r) + return r; + if (amdgpu_sriov_vf(adev)) { amdgpu_virt_fini_data_exchange(adev); r = amdgpu_virt_request_full_gpu(adev, false); |