All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] drm/amdgpu: initialze ras caps per paltform config
@ 2021-04-02  6:43 Hawking Zhang
  2021-04-02  6:43 ` [PATCH 02/11] drm/amdgpu: create umc_v6_7_funcs for aldebaran Hawking Zhang
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Hawking Zhang @ 2021-04-02  6:43 UTC (permalink / raw)
  To: amd-gfx, John Clements, Dennis Li, Alex Deucher; +Cc: Hawking Zhang

Driver only manages GFX/SDMA/MMHUB RAS in platforms
that gpu node is connected to cpu through XGMI, other
than that, it queries VBIOS for RAS capabilities.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: John Clements <John.Clements@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 35 ++++++++++++++++---------
 1 file changed, 23 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 26458946145c..1708045e2a0d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1936,6 +1936,7 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev)
 	return adev->asic_type == CHIP_VEGA10 ||
 		adev->asic_type == CHIP_VEGA20 ||
 		adev->asic_type == CHIP_ARCTURUS ||
+		adev->asic_type == CHIP_ALDEBARAN ||
 		adev->asic_type == CHIP_SIENNA_CICHLID;
 }
 
@@ -1958,19 +1959,29 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev,
 	    !amdgpu_ras_asic_supported(adev))
 		return;
 
-	if (amdgpu_atomfirmware_mem_ecc_supported(adev)) {
-		dev_info(adev->dev, "MEM ECC is active.\n");
-		*hw_supported |= (1 << AMDGPU_RAS_BLOCK__UMC |
-				1 << AMDGPU_RAS_BLOCK__DF);
-	} else
-		dev_info(adev->dev, "MEM ECC is not presented.\n");
+	if (!adev->gmc.xgmi.connected_to_cpu) {
+		if (amdgpu_atomfirmware_mem_ecc_supported(adev)) {
+			dev_info(adev->dev, "MEM ECC is active.\n");
+			*hw_supported |= (1 << AMDGPU_RAS_BLOCK__UMC |
+					1 << AMDGPU_RAS_BLOCK__DF);
+		} else {
+			dev_info(adev->dev, "MEM ECC is not presented.\n");
+		}
 
-	if (amdgpu_atomfirmware_sram_ecc_supported(adev)) {
-		dev_info(adev->dev, "SRAM ECC is active.\n");
-		*hw_supported |= ~(1 << AMDGPU_RAS_BLOCK__UMC |
-				1 << AMDGPU_RAS_BLOCK__DF);
-	} else
-		dev_info(adev->dev, "SRAM ECC is not presented.\n");
+		if (amdgpu_atomfirmware_sram_ecc_supported(adev)) {
+			dev_info(adev->dev, "SRAM ECC is active.\n");
+			*hw_supported |= ~(1 << AMDGPU_RAS_BLOCK__UMC |
+					1 << AMDGPU_RAS_BLOCK__DF);
+		} else {
+			dev_info(adev->dev, "SRAM ECC is not presented.\n");
+		}
+	} else {
+		/* driver only manages a few IP blocks RAS feature
+		 * when GPU is connected cpu through XGMI */
+		*hw_supported |= (1 << AMDGPU_RAS_BLOCK__GFX |
+				1 << AMDGPU_RAS_BLOCK__SDMA |
+				1 << AMDGPU_RAS_BLOCK__MMHUB);
+	}
 
 	/* hw_supported needs to be aligned with RAS block mask. */
 	*hw_supported &= AMDGPU_RAS_BLOCK_MASK;
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-04-02  6:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02  6:43 [PATCH 01/11] drm/amdgpu: initialze ras caps per paltform config Hawking Zhang
2021-04-02  6:43 ` [PATCH 02/11] drm/amdgpu: create umc_v6_7_funcs for aldebaran Hawking Zhang
2021-04-02  6:43 ` [PATCH 03/11] drm/amdgpu: add helper funtion to query umc ras error Hawking Zhang
2021-04-02  6:43 ` [PATCH 04/11] drm/amdgpu: implement umc query error count callback Hawking Zhang
2021-04-02  6:43 ` [PATCH 05/11] drm/amdgpu: implement query_ras_error_address callback Hawking Zhang
2021-04-02  6:43 ` [PATCH 06/11] drm/amdgpu: split nbio callbacks into ras and non-ras ones Hawking Zhang
2021-04-02  6:43 ` [PATCH 07/11] drm/amdgpu: move xgmi ras functions to xgmi_ras_funcs Hawking Zhang
2021-04-02  6:43 ` [PATCH 08/11] drm/amdgpu: split umc callbacks to ras and non-ras ones Hawking Zhang
2021-04-02  6:43 ` [PATCH 09/11] drm/amdgpu: do not register df_mca interrupt in certain config Hawking Zhang
2021-04-02  6:43 ` [PATCH 10/11] drm/amdgpu: split mmhub callbacks into ras and non-ras ones Hawking Zhang
2021-04-02  6:43 ` [PATCH 11/11] drm/amdgpu: split gfx " Hawking Zhang
2021-04-02  6:47   ` Clements, John

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.