drm/amdgpu: Move kfd suspend before evict resource
Subsystems (2)
PATCH 1/1 drm/amdgpu: Move kfd suspend before evict resource
Like amdgpu_device_reset_sriov does, kfd suspend should be called at the beginning to make sure kfd BO is idle. Otherwise the extra amdgpu_device_evict_resources fails or amdgpu_virt_request_full_gpu timeout.
Signed-off-by xinhui pan <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
@@ -4148,6 +4148,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) adev->in_suspend = true; +if (!adev->in_s0ix) +amdgpu_amdkfd_suspend (adev, adev->in_runpm); +/* Evict the majority of BOs before grabbing the full access */ r =amdgpu_device_evict_resources (adev);if (r)
@@ -4174,9 +4177,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)amdgpu_device_ip_suspend_phase1 (adev); -if (!adev->in_s0ix) -amdgpu_amdkfd_suspend (adev, adev->in_runpm); - r =amdgpu_device_evict_resources (adev);if (r)return r;
Signature · 1 line
2.34.1
Quoted 6 lines · xinhui pan
Like
amdgpu_device_reset_sriovdoes, kfd suspend should be called at the beginning to make sure kfd BO is idle. Otherwise the extraamdgpu_device_evict_resourcesfails oramdgpu_virt_request_full_gputimeout.Signed-off-by xinhui pan <[email protected]>
Acked-by Felix Kuehling <[email protected]>
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-3@@ -4148,6 +4148,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) adev->in_suspend = true; +if (!adev->in_s0ix) +amdgpu_amdkfd_suspend (adev, adev->in_runpm); +/* Evict the majority of BOs before grabbing the full access */ r =amdgpu_device_evict_resources (adev);if (r)@@ -4174,9 +4177,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)amdgpu_device_ip_suspend_phase1 (adev); -if (!adev->in_s0ix) -amdgpu_amdkfd_suspend (adev, adev->in_runpm); - r =amdgpu_device_evict_resources (adev);if (r)return r;