drm/amdgpu: don't increment vram lost if we are in hibernation
Subsystems (2)
PATCH 1/1 drm/amdgpu: don't increment vram lost if we are in hibernation
We reset the GPU as part of our hibernation sequence so we need to make sure we don't mark vram as lost in that case.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +4 -2
@@ -319,10 +319,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); }
drivers/gpu/drm/amd/amdgpu/soc15.c +4 -2
@@ -564,12 +564,14 @@ static int soc15_asic_reset(struct amdgpu_device *adev) {switch (soc15_asic_reset_method (adev)) {case AMD_RESET_METHOD_BACO : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);return soc15_asic_baco_reset (adev);case AMD_RESET_METHOD_MODE2 :return soc15_mode2_reset (adev);default : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);return soc15_asic_mode1_reset (adev); } }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191001214829.24634-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Christian König
Acked-byAm 01.10.19 um 23:48 schrieb Alex Deucher:
Quoted 5 lines
We reset the GPU as part of our hibernation sequence so we need to make sure we don't mark vram as lost in that case.
Quoted 35 lines
--- drivers/gpu/drm/amd/amdgpu/nv.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/nv.c +4
-2@@ -319,10 +319,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); }drivers/gpu/drm/amd/amdgpu/soc15.c +2
-1@@ -564,12 +564,14 @@ static int soc15_asic_reset(struct amdgpu_device *adev) {switch (soc15_asic_reset_method (adev)) {case AMD_RESET_METHOD_BACO : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);
drivers/gpu/drm/amd/amdgpu/soc15.c static int soc15_asic_reset(struct amdgpu_device *adev) · line 577
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +2
-1return soc15_asic_baco_reset (adev);case AMD_RESET_METHOD_MODE2 :return soc15_mode2_reset (adev);default : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);return soc15_asic_mode1_reset (adev); } }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Huang, Ray
Reviewed-by Huang Rui-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, October 1, 2019 5:48 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: don't increment vram lost if we are in hibernation
We reset the GPU as part of our hibernation sequence so we need to make sure we don't mark vram as lost in that case.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +4 -2
@@ -319,10 +319,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); }
drivers/gpu/drm/amd/amdgpu/soc15.c +4 -3
@@ -564,12 +564,14 @@ static int soc15_asic_reset(struct amdgpu_device *adev) {switch (soc15_asic_reset_method (adev)) {case AMD_RESET_METHOD_BACO : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);return soc15_asic_baco_reset (adev);case AMD_RESET_METHOD_MODE2 :return soc15_mode2_reset (adev);default : -amdgpu_inc_vram_lost (adev); +if (!adev->in_suspend) +amdgpu_inc_vram_lost (adev);return soc15_asic_mode1_reset (adev); } } --
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx