summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHorace Chen <horace.chen@amd.com>2021-03-23 14:22:22 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-04-09 16:42:54 -0400
commit437f3e0b6eb24cc777473ae55f4b98e720258779 (patch)
tree180601373e89909f64fb61dbae0d7d3603c16179 /drivers
parent181e772f7d1ac724ede20d37f5ea2dca9359d797 (diff)
downloadlinux-437f3e0b6eb24cc777473ae55f4b98e720258779.tar.bz2
drm/amdgpu: move vram recover into sriov full access
[what] currently driver recover vram after full access, which may hit a corner case that meanwhile another whole gpu reset may be triggered by another VF, which will cause vram recover fail then fail the whole device reset. [how] move the recover vram into full access. So another bad VF will not disturb the recover sequence for this vf. Signed-off-by: Horace Chen <horace.chen@amd.com> Reviewed by: Monk.Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 7ae5e1d8202d..789b02508077 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4103,11 +4103,11 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
amdgpu_amdkfd_post_reset(adev);
error:
- amdgpu_virt_release_full_gpu(adev, true);
if (!r && adev->virt.gim_feature & AMDGIM_FEATURE_GIM_FLR_VRAMLOST) {
amdgpu_inc_vram_lost(adev);
r = amdgpu_device_recover_vram(adev);
}
+ amdgpu_virt_release_full_gpu(adev, true);
return r;
}