summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/nv.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-11-06 10:52:10 +0100
committerJan Kara <jack@suse.cz>2019-11-06 10:52:10 +0100
commitdae82c7fd0926840c832151f3258ba751f73d348 (patch)
tree5cdef8359f6cfb964919ffb0bfa36d2de60140b1 /drivers/gpu/drm/amd/amdgpu/nv.c
parentreiserfs: replace open-coded atomic_dec_and_mutex_lock() (diff)
parentquota: Handle quotas without quota inodes in dquot_get_state() (diff)
downloadlinux-dae82c7fd0926840c832151f3258ba751f73d348.tar.xz
linux-dae82c7fd0926840c832151f3258ba751f73d348.zip
Pull series refactoring quota enabling and disabling code.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nv.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/nv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 85393a99a848..de9b995b65b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -317,10 +317,12 @@ static int nv_asic_reset(struct amdgpu_device *adev)
struct smu_context *smu = &adev->smu;
if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
- amdgpu_inc_vram_lost(adev);
+ if (!adev->in_suspend)
+ amdgpu_inc_vram_lost(adev);
ret = smu_baco_reset(smu);
} else {
- amdgpu_inc_vram_lost(adev);
+ if (!adev->in_suspend)
+ amdgpu_inc_vram_lost(adev);
ret = nv_asic_mode1_reset(adev);
}