Skip to contentSkip to conversation

drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

PATCH In review Tao Zhou 3 participants 5 messages Dec 8, 2021

Subsystems (2)
lore
Share & tools
lore

Tao Zhou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

The RAS poison mode is enabled by default on the platform.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -1
index a95d200adff9..0003f2c64da8 100644
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
 	}
 
 	/* Init poison supported flag, the default value is false */
-	if (adev->df.funcs &&
+	if (adev->gmc.xgmi.connected_to_cpu) {
+		/* enabled by default when GPU is connected to CPU */
+		con->poison_supported = true;
+	}
+	else if (adev->df.funcs &&
 	    adev->df.funcs->query_ras_poison_mode &&
 	    adev->umc.ras_funcs &&
 	    adev->umc.ras_funcs->query_ras_poison_mode) {
Signature · 1 line
2.17.1
#1 lore raw

[AMD Official Use Only]

Quoted 23 lines

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Wednesday, December 8, 2021 11:50 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

The RAS poison mode is enabled by default on the platform.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index a95d200adff9..0003f2c64da8 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_init(struct amdgpu_device *adev) · line 2375

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
 	}
 
 	/* Init poison supported flag, the default value is false */
-	if (adev->df.funcs &&
+	if (adev->gmc.xgmi.connected_to_cpu) {

Why not considering PCIe interface connected device by default? PCIe interface connected device will not see this issue?

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -1
+		/* enabled by default when GPU is connected to CPU */
+		con->poison_supported = true;
+	}
+	else if (adev->df.funcs &&
 	    adev->df.funcs->query_ras_poison_mode &&
 	    adev->umc.ras_funcs &&
 	    adev->umc.ras_funcs->query_ras_poison_mode) {
--

2.17.1

author
#2 lore raw

[AMD Official Use Only]

Quoted 37 lines

-----Original Message-----
From: Ziya, Mohammad zafar <[email protected]>
Sent: Wednesday, December 8, 2021 2:47 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

[AMD Official Use Only]

Quoted 25 lines

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Wednesday, December 8, 2021 11:50 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

The RAS poison mode is enabled by default on the platform.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index a95d200adff9..0003f2c64da8 100644
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
 	}
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_init(struct amdgpu_device *adev) · line 2375

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
 	/* Init poison supported flag, the default value is false */
-	if (adev->df.funcs &&
+	if (adev->gmc.xgmi.connected_to_cpu) {

Why not considering PCIe interface connected device by default? PCIe interface connected device will not see this issue?

[Tao] What do you mean by "PCIe interface connected device"?
I think the else if path can handle other platforms and the default value of poison_supported is false on other systems.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -1
+		/* enabled by default when GPU is connected to CPU */
+		con->poison_supported = true;
+	}
+	else if (adev->df.funcs &&
 	    adev->df.funcs->query_ras_poison_mode &&
 	    adev->umc.ras_funcs &&
 	    adev->umc.ras_funcs->query_ras_poison_mode) {
--

2.17.1

#3 lore raw

[AMD Official Use Only]

Quoted 57 lines

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Wednesday, December 8, 2021 12:52 PM
To: Ziya, Mohammad zafar <[email protected]>; amd- [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

[AMD Official Use Only]

Quoted 29 lines

-----Original Message-----
From: Ziya, Mohammad zafar <[email protected]>
Sent: Wednesday, December 8, 2021 2:47 PM
To: Zhou1, Tao <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

[AMD Official Use Only]

Quoted 17 lines

-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Wednesday, December 8, 2021 11:50 AM
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

The RAS poison mode is enabled by default on the platform.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++++-

1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_init(struct amdgpu_device

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index a95d200adff9..0003f2c64da8 100644
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device

*adev)

Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c int amdgpu_ras_init(struct amdgpu_device *adev) · line 2375

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
 	}
 
 	/* Init poison supported flag, the default value is false */
-	if (adev->df.funcs &&
+	if (adev->gmc.xgmi.connected_to_cpu) {

Why not considering PCIe interface connected device by default? PCIe interface connected device will not see this issue?

Quoted 3 lines

[Tao] What do you mean by "PCIe interface connected device"?
I think the else if path can handle other platforms and the default value of poison_supported is false on other systems.

[zafar]: GPU device connected to CPU over PCIe link without XGMI link and VBIOS flag does not support UMC RAS error injection.

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -1
+		/* enabled by default when GPU is connected to CPU */
+		con->poison_supported = true;
+	}
+	else if (adev->df.funcs &&
 	    adev->df.funcs->query_ras_poison_mode &&
 	    adev->umc.ras_funcs &&
 	    adev->umc.ras_funcs->query_ras_poison_mode) {
--

2.17.1

Reviewed-by on v1 1/1
#4 lore raw
In reply to Tao Zhou

[AMD Official Use Only]

Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Wednesday, December 8, 2021 14:20
To: [email protected]; Zhang, Hawking <[email protected]>; Ziya, Mohammad zafar <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: enable RAS poison flag when GPU is connected to CPU

The RAS poison mode is enabled by default on the platform.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -1
index a95d200adff9..0003f2c64da8 100644
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
 	}
 
 	/* Init poison supported flag, the default value is false */
-	if (adev->df.funcs &&
+	if (adev->gmc.xgmi.connected_to_cpu) {
+		/* enabled by default when GPU is connected to CPU */
+		con->poison_supported = true;
+	}
+	else if (adev->df.funcs &&
 	    adev->df.funcs->query_ras_poison_mode &&
 	    adev->umc.ras_funcs &&
 	    adev->umc.ras_funcs->query_ras_poison_mode) {
Signature · 1 line
2.17.1