Skip to contentSkip to conversation

drm/amdgpu: flag vram lost on baco reset for VI/CIK

PATCH In review Alex Deucher 3 participants 3 messages Nov 25, 2019 – Nov 26, 2019 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: flag vram lost on baco reset for VI/CIK

VI/CIK BACO was inflight when this fix landed for SOC15/NV. Add the fix to VI/CIK as well.

---
 drivers/gpu/drm/amd/amdgpu/cik.c | 7 +++++--
 drivers/gpu/drm/amd/amdgpu/vi.c  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/cik.c +5 -2
index 968bc706b94d..1dfe4a1337cf 100644
@@ -1363,10 +1363,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;
 }
drivers/gpu/drm/amd/amdgpu/vi.c +5 -2
index 871c0b8c6b0b..e4f4201b3c34 100644
@@ -804,10 +804,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;
 }
Signature · 6 lines
2.23.0

_______________________________________________
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): 20191125161239.347655-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Acked-by Evan Quan
#2 lore raw
Quoted 62 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, November 26, 2019 12:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: flag vram lost on baco reset for VI/CIK

VI/CIK BACO was inflight when this fix landed for SOC15/NV. Add the fix to VI/CIK as well.

---
 drivers/gpu/drm/amd/amdgpu/cik.c | 7 +++++--
drivers/gpu/drm/amd/amdgpu/vi.c  | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/cik.c +5 -2
index 968bc706b94d..1dfe4a1337cf 100644
@@ -1363,10 +1363,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;
 }
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/vi.c index 871c0b8c6b0b..e4f4201b3c34 100644

drivers/gpu/drm/amd/amdgpu/vi.c +5 -3
@@ -804,10 +804,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.23.0

Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
desktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Cevan.quan%40amd.com%7C8a58026b66d248b27e 2208d771c25518%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637 102951814200617&amp;sdata=7lKNfG8NpzBKslKIoOvseyl2awlM1DcxSNntv%2F UACjw%3D&amp;reserved=0

_______________________________________________
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): MN2PR12MB334444E864912858AB31DE4FE4450-rweVpJHSKToDMgCC8P//[email protected]

#4 lore raw

Am 26.11.19 um 04:11 schrieb Quan, Evan:

Quoted 64 lines
Quoted 62 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, November 26, 2019 12:13 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: flag vram lost on baco reset for VI/CIK

VI/CIK BACO was inflight when this fix landed for SOC15/NV. Add the fix to VI/CIK as well.

---
  drivers/gpu/drm/amd/amdgpu/cik.c | 7 +++++--
drivers/gpu/drm/amd/amdgpu/vi.c  | 7 +++++--
  2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/cik.c +5 -2
index 968bc706b94d..1dfe4a1337cf 100644
@@ -1363,10 +1363,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;
  }
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdgpu/vi.c index 871c0b8c6b0b..e4f4201b3c34 100644

drivers/gpu/drm/amd/amdgpu/vi.c +5 -3
@@ -804,10 +804,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.23.0

Quoted 13 lines
Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.free
desktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Cevan.quan%40amd.com%7C8a58026b66d248b27e 2208d771c25518%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637 102951814200617&amp;sdata=7lKNfG8NpzBKslKIoOvseyl2awlM1DcxSNntv%2F UACjw%3D&amp;reserved=0

_______________________________________________
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