aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch
new file mode 100644
index 00000000..253523f6
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4603-drm-amdgpu-flag-vram-lost-on-baco-reset-for-VI-CIK.patch
@@ -0,0 +1,62 @@
+From 8743a9f301867b65a7a690d147237052a6e5d999 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Mon, 25 Nov 2019 11:11:18 -0500
+Subject: [PATCH 4603/4736] drm/amdgpu: flag vram lost on baco reset for VI/CIK
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+VI/CIK BACO was inflight when this fix landed for SOC15/NV.
+Add the fix to VI/CIK as well.
+
+Acked-by: Evan Quan <evan.quan@amd.com>
+Acked-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/cik.c | 7 +++++--
+ drivers/gpu/drm/amd/amdgpu/vi.c | 7 +++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
+index a5162412989b..51cbcd36f3d0 100644
+--- a/drivers/gpu/drm/amd/amdgpu/cik.c
++++ b/drivers/gpu/drm/amd/amdgpu/cik.c
+@@ -1362,10 +1362,13 @@ static int cik_asic_reset(struct amdgpu_device *adev)
+ {
+ int r;
+
+- if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)
++ if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
++ if (!adev->in_suspend)
++ amdgpu_inc_vram_lost(adev);
+ r = smu7_asic_baco_reset(adev);
+- else
++ } else {
+ r = cik_asic_pci_config_reset(adev);
++ }
+
+ return r;
+ }
+diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
+index 14228bca071b..461f13d7366a 100644
+--- a/drivers/gpu/drm/amd/amdgpu/vi.c
++++ b/drivers/gpu/drm/amd/amdgpu/vi.c
+@@ -802,10 +802,13 @@ static int vi_asic_reset(struct amdgpu_device *adev)
+ {
+ int r;
+
+- if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)
++ if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
++ if (!adev->in_suspend)
++ amdgpu_inc_vram_lost(adev);
+ r = smu7_asic_baco_reset(adev);
+- else
++ } else {
+ r = vi_asic_pci_config_reset(adev);
++ }
+
+ return r;
+ }
+--
+2.17.1
+