summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-10-30 20:11:54 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-12-04 16:41:45 -0500
commit75bc6099bc619bd58e09d5203081ec9dc5535ec1 (patch)
treecad2d836c835537b6deaf5c47e09669cb1e86f8e /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent0c03b912d7f84636766bc26d38df5b21f1c00e94 (diff)
drm/amdgpu:read VRAMLOST from gim
Signed-off-by: Monk Liu <Monk.Liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@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.c9
1 files changed, 4 insertions, 5 deletions
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;