summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/nv.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2019-08-27 11:32:55 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-08-29 23:52:32 +0300
commite352625796b343cc85b7648a74a57e739b12dc27 (patch)
treec92bb26919481c25bd7f2eea7ed27ac9f9ec6ccf /drivers/gpu/drm/amd/amdgpu/nv.c
parent514ad79103f5d278cb6b190eb0c1f83461fa70a9 (diff)
downloadlinux-e352625796b343cc85b7648a74a57e739b12dc27.tar.xz
drm/amdgpu: introduce vram lost for reset (v2)
for SOC15/vega10 the BACO reset & mode1 would introduce vram lost in high end address range, current kmd's vram lost checking cannot catch it since it only check very ahead visible frame buffer v2: cover NV as well Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nv.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index e150c281feb6..1b476fcd2197 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -316,10 +316,13 @@ static int nv_asic_reset(struct amdgpu_device *adev)
int ret = 0;
struct smu_context *smu = &adev->smu;
- if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)
+ if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
+ amdgpu_inc_vram_lost(adev);
ret = smu_baco_reset(smu);
- else
+ } else {
+ amdgpu_inc_vram_lost(adev);
ret = nv_asic_mode1_reset(adev);
+ }
return ret;
}