diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2022-01-07 09:51:15 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-01-11 15:44:26 -0500 |
commit | 575e55ee4fbc2c641a29b0054b3473e9fa81ae76 (patch) | |
tree | b77e89a9f0d3bf0c8810f579e830e2ee708dae11 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | ec6aae9711a8e5fca24a537b9ae952e38a1ebb71 (diff) | |
download | linux-575e55ee4fbc2c641a29b0054b3473e9fa81ae76.tar.bz2 |
drm/amdgpu: recover gart table at resume
Get rid off pin/unpin of gart BO at resume/suspend and
instead pin only once and try to recover gart content
at resume time. This is much more stable in case there
is OOM situation at 2nd call to amdgpu_device_evict_resources()
while evicting GART table.
v3: remove gart recovery from other places
v2: pin gart at amdgpu_gart_table_vram_alloc()
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index e9d34f0304bb..87aea86fc8d1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4016,16 +4016,11 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) if (!adev->in_s0ix) amdgpu_amdkfd_suspend(adev, adev->in_runpm); - /* First evict vram memory */ amdgpu_device_evict_resources(adev); amdgpu_fence_driver_hw_fini(adev); amdgpu_device_ip_suspend_phase2(adev); - /* This second call to evict device resources is to evict - * the gart page table using the CPU. - */ - amdgpu_device_evict_resources(adev); return 0; } @@ -4370,8 +4365,6 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev, goto error; amdgpu_virt_init_data_exchange(adev); - /* we need recover gart prior to run SMC/CP/SDMA resume */ - amdgpu_gtt_mgr_recover(&adev->mman.gtt_mgr); r = amdgpu_device_fw_loading(adev); if (r) @@ -4691,10 +4684,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle, amdgpu_inc_vram_lost(tmp_adev); } - r = amdgpu_gtt_mgr_recover(&tmp_adev->mman.gtt_mgr); - if (r) - goto out; - r = amdgpu_device_fw_loading(tmp_adev); if (r) return r; |