Skip to contentSkip to conversation

drm/amdgpu: Adjust XGMI WAFL ras enable bit

PATCH In review Stanley.Yang 2 participants 3 messages Apr 25, 2024

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

PATCH 1/1 drm/amdgpu: Adjust XGMI WAFL ras enable bit

The way to get ras capability has changed for some asics, both of them need check XGMI physical nodes number to set XGMI WAFL ras enable bit.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -7
index b2a883d3e19d..ea77e00cc002 100644
@@ -2918,13 +2918,6 @@ static void amdgpu_ras_query_ras_capablity_from_vbios(struct amdgpu_device *adev
 		else
 			adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__VCN |
 						  1 << AMDGPU_RAS_BLOCK__JPEG);
-
-		/*
-		 * XGMI RAS is not supported if xgmi num physical nodes
-		 * is zero
-		 */
-		if (!adev->gmc.xgmi.num_physical_nodes)
-			adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
 	} else {
 		dev_info(adev->dev, "SRAM ECC is not presented.\n");
 	}
@@ -3002,6 +2995,13 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev)
 	amdgpu_ras_query_poison_mode(adev);
 
 init_ras_enabled_flag:
+	/*
+	 * XGMI RAS is not supported if xgmi num physical nodes
+	 * is zero
+	 */
+	if (!adev->gmc.xgmi.num_physical_nodes)
+		adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
+
 	/* hw_supported needs to be aligned with RAS block mask. */
 	adev->ras_hw_enabled &= AMDGPU_RAS_BLOCK_MASK;
 
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only - General]

Hmm... we do expect PSP report the XGMI/WAFL Caps. This is different from legacy RAS CAP check through atomfirmware. But if you found the XGMI/WAFL bits are not set properly in the new PSP interface, let's reach out to PSP firmware team for a fix.

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Thursday, April 25, 2024 15:08
To: [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

The way to get ras capability has changed for some asics, both of them need check XGMI physical nodes number to set XGMI WAFL ras enable bit.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -7
index b2a883d3e19d..ea77e00cc002 100644
@@ -2918,13 +2918,6 @@ static void amdgpu_ras_query_ras_capablity_from_vbios(struct amdgpu_device *adev
                else
                        adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__VCN |
                                                  1 << AMDGPU_RAS_BLOCK__JPEG);
-
-               /*
-                * XGMI RAS is not supported if xgmi num physical nodes
-                * is zero
-                */
-               if (!adev->gmc.xgmi.num_physical_nodes)
-                       adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
        } else {
                dev_info(adev->dev, "SRAM ECC is not presented.\n");
        }
@@ -3002,6 +2995,13 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev)
        amdgpu_ras_query_poison_mode(adev);
 
 init_ras_enabled_flag:
+       /*
+        * XGMI RAS is not supported if xgmi num physical nodes
+        * is zero
+        */
+       if (!adev->gmc.xgmi.num_physical_nodes)
+               adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
+
        /* hw_supported needs to be aligned with RAS block mask. */
        adev->ras_hw_enabled &= AMDGPU_RAS_BLOCK_MASK;
 

--
2.25.1

#2 lore raw

[AMD Official Use Only - General]

Thanks for reminding, the XGMI/WAFL caps is set on device without XGMI link, will notice PSP firmware team to fix.

Regards,
Stanley

Quoted 73 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Thursday, April 25, 2024 3:26 PM
To: Yang, Stanley <[email protected]>; [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: RE: [PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

[AMD Official Use Only - General]

Hmm... we do expect PSP report the XGMI/WAFL Caps. This is different from legacy RAS CAP check through atomfirmware. But if you found the XGMI/WAFL bits are not set properly in the new PSP interface, let's reach out to PSP firmware team for a fix.

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Thursday, April 25, 2024 15:08
To: [email protected]
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Adjust XGMI WAFL ras enable bit

The way to get ras capability has changed for some asics, both of them need check XGMI physical nodes number to set XGMI WAFL ras enable bit.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index b2a883d3e19d..ea77e00cc002 100644
@@ -2918,13 +2918,6 @@ static void

amdgpu_ras_query_ras_capablity_from_vbios(struct amdgpu_device *adev

                else
                        adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__VCN |
                                                  1 << AMDGPU_RAS_BLOCK__JPEG);
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -7
-
-               /*
-                * XGMI RAS is not supported if xgmi num physical nodes
-                * is zero
-                */
-               if (!adev->gmc.xgmi.num_physical_nodes)
-                       adev->ras_hw_enabled &= ~(1 <<
AMDGPU_RAS_BLOCK__XGMI_WAFL);
        } else {
                dev_info(adev->dev, "SRAM ECC is not presented.\n");
        }
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -0
@@ -3002,6 +2995,13 @@ static void amdgpu_ras_check_supported(struct
 amdgpu_device *adev)
        amdgpu_ras_query_poison_mode(adev);
 
 init_ras_enabled_flag:
+       /*
+        * XGMI RAS is not supported if xgmi num physical nodes
+        * is zero
+        */
+       if (!adev->gmc.xgmi.num_physical_nodes)
+               adev->ras_hw_enabled &= ~(1 <<
 AMDGPU_RAS_BLOCK__XGMI_WAFL);
+
        /* hw_supported needs to be aligned with RAS block mask. */
        adev->ras_hw_enabled &= AMDGPU_RAS_BLOCK_MASK;

--
2.25.1