Skip to contentSkip to conversation

drm/amdgpu: fix unexpected block id

PATCH In review Stanley.Yang 3 participants 5 messages Apr 11, 2023

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

PATCH v2 1/2 drm/amdgpu: fix unexpected block id

Aldebaran supports VCN and JPEG RAS, it reports unexpected block id message during VCN and JPEG RAS initialization if VCN and JPEG block id not defined.

Change-Id Icceb43556eec802f11c2077c1c58a1e92c9df599
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h | 4 ++++
 drivers/gpu/drm/amd/amdgpu/ta_ras_if.h  | 2 ++
 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h +4 -0
index ef38f4c93df0..17b3d1992e80 100644
@@ -583,6 +583,10 @@ amdgpu_ras_block_to_ta(enum amdgpu_ras_block block) {
 		return TA_RAS_BLOCK__FUSE;
 	case AMDGPU_RAS_BLOCK__MCA:
 		return TA_RAS_BLOCK__MCA;
+	case AMDGPU_RAS_BLOCK__VCN:
+		return TA_RAS_BLOCK__VCN;
+	case AMDGPU_RAS_BLOCK__JPEG:
+		return TA_RAS_BLOCK__JPEG;
 	default:
 		WARN_ONCE(1, "RAS ERROR: unexpected block id %d\n", block);
 		return TA_RAS_BLOCK__UMC;
drivers/gpu/drm/amd/amdgpu/ta_ras_if.h +2 -0
index 509d8a1945eb..30d0482ac466 100644
@@ -84,6 +84,8 @@ enum ta_ras_block {
 	TA_RAS_BLOCK__MP1,
 	TA_RAS_BLOCK__FUSE,
 	TA_RAS_BLOCK__MCA,
+	TA_RAS_BLOCK__VCN,
+	TA_RAS_BLOCK__JPEG,
 	TA_NUM_BLOCK_MAX
 };
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 2/2 drm/amdgpu: correct ras enabled flag

XGMI RAS should be according to the gmc xgmi physical nodes number, XGMI RAS should not be enabled if xgmi num_physical_nodes is zero.

Change-Id Idf3600b30584b10b528e7237d103d84d5097b7e0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -0
index 4069bce9479f..c2c4d978896c 100644
@@ -2430,6 +2430,13 @@ static void amdgpu_ras_check_supported(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.xmgi.num_physical_nodes == 0)
+				adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
 		} else {
 			dev_info(adev->dev, "SRAM ECC is not presented.\n");
 		}
Signature · 1 line
2.17.1
Reviewed-by on v2 2/2
#2 lore raw

RE: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

[AMD Official Use Only - General]

You might consider use ! adev->gmc.xmgi.num_physical_nodes, apart from that

Series is

Regards,
Hawking
-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Tuesday, April 11, 2023 17:33
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Chen, Guchun <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

XGMI RAS should be according to the gmc xgmi physical nodes number, XGMI RAS should not be enabled if xgmi num_physical_nodes is zero.

Change-Id Idf3600b30584b10b528e7237d103d84d5097b7e0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -0
index 4069bce9479f..c2c4d978896c 100644
@@ -2430,6 +2430,13 @@ static void amdgpu_ras_check_supported(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.xmgi.num_physical_nodes == 0)
+                               adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
                } else {
                        dev_info(adev->dev, "SRAM ECC is not presented.\n");
                }

--
2.17.1

#3 lore raw

RE: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

In reply to Stanley.Yang

[AMD Official Use Only - General]

Quoted 1 line

if (adev->gmc.xmgi.

This looks like a typo. Should be gmc.xgmi

Thanks,
Lijo

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Tuesday, April 11, 2023 3:03 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Chen, Guchun <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

XGMI RAS should be according to the gmc xgmi physical nodes number, XGMI RAS should not be enabled if xgmi num_physical_nodes is zero.

Change-Id Idf3600b30584b10b528e7237d103d84d5097b7e0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +7 -0
index 4069bce9479f..c2c4d978896c 100644
@@ -2430,6 +2430,13 @@ static void amdgpu_ras_check_supported(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.xmgi.num_physical_nodes == 0)
+				adev->ras_hw_enabled &= ~(1 << AMDGPU_RAS_BLOCK__XGMI_WAFL);
 		} else {
 			dev_info(adev->dev, "SRAM ECC is not presented.\n");
 		}

--
2.17.1

#4 lore raw

RE: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

[AMD Official Use Only - General]

Thanks, It's a typo, I have fixed it before be merged.

Regards,
Stanley

Quoted 64 lines

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, April 11, 2023 6:08 PM
To: Yang, Stanley <[email protected]>; [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Chen, Guchun <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: RE: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

[AMD Official Use Only - General]

Quoted 1 line

if (adev->gmc.xmgi.

This looks like a typo. Should be gmc.xgmi

Thanks,
Lijo

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Stanley.Yang
Sent: Tuesday, April 11, 2023 3:03 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Chen, Guchun <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review V2 2/2] drm/amdgpu: correct ras enabled flag

XGMI RAS should be according to the gmc xgmi physical nodes number, XGMI RAS should not be enabled if xgmi num_physical_nodes is zero.

Change-Id Idf3600b30584b10b528e7237d103d84d5097b7e0
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index 4069bce9479f..c2c4d978896c 100644
@@ -2430,6 +2430,13 @@ static void amdgpu_ras_check_supported(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 +3 -0
+
+			/*
+			 * XGMI RAS is not supported if xgmi num physical

nodes

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -0
+			 * is zero
+			 */
+			if (adev->gmc.xmgi.num_physical_nodes == 0)
+				adev->ras_hw_enabled &= ~(1 <<

AMDGPU_RAS_BLOCK__XGMI_WAFL);

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
 		} else {
 			dev_info(adev->dev, "SRAM ECC is not

presented.\n");
}
--
2.17.1