From 75bc6099bc619bd58e09d5203081ec9dc5535ec1 Mon Sep 17 00:00:00 2001 From: Monk Liu Date: Mon, 30 Oct 2017 20:11:54 +0800 Subject: drm/amdgpu:read VRAMLOST from gim Signed-off-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 05087eda0b71..57267ac265f0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3037,11 +3037,10 @@ error: amdgpu_virt_release_full_gpu(adev, true); if (reset_flags) { - /* will get vram_lost from GIM in future, now all - * reset request considered VRAM LOST - */ - (*reset_flags) |= ~AMDGPU_RESET_INFO_VRAM_LOST; - atomic_inc(&adev->vram_lost_counter); + if (adev->virt.gim_feature & AMDGIM_FEATURE_GIM_FLR_VRAMLOST) { + (*reset_flags) |= AMDGPU_RESET_INFO_VRAM_LOST; + atomic_inc(&adev->vram_lost_counter); + } /* VF FLR or hotlink reset is always full-reset */ (*reset_flags) |= AMDGPU_RESET_INFO_FULLRESET; -- cgit v1.2.3