Skip to contentSkip to conversation

drm/amdgpu: Fix hbm stack id in boot error report

PATCH In review Hawking Zhang 2 participants 2 messages Jun 28, 2024

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

PATCH 1/1 drm/amdgpu: Fix hbm stack id in boot error report

To align with firmware, hbm id field 0x1 refers to hbm stack 0, 0x2 refers to hbm statck 1.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index 4edd8e333d36..6d1f974e2987 100644
@@ -4565,7 +4565,7 @@ static void amdgpu_ras_boot_time_error_reporting(struct amdgpu_device *adev,
 
 	socket_id = AMDGPU_RAS_GPU_ERR_SOCKET_ID(boot_error);
 	aid_id = AMDGPU_RAS_GPU_ERR_AID_ID(boot_error);
-	hbm_id = AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error);
+	hbm_id = ((1 == AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error)) ? 0 : 1);
 
 	if (AMDGPU_RAS_GPU_ERR_MEM_TRAINING(boot_error))
 		dev_info(adev->dev,
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

How about:

hbm_id = AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error) - 1;

Anyway, the patch is:

Quoted 32 lines

-----Original Message-----
From: Hawking Zhang <[email protected]>
Sent: Friday, June 28, 2024 5:04 PM
To: [email protected]; Zhou1, Tao <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix hbm stack id in boot error report

To align with firmware, hbm id field 0x1 refers to hbm stack 0, 0x2 refers to hbm statck 1.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index 4edd8e333d36..6d1f974e2987 100644
@@ -4565,7 +4565,7 @@ static void
 amdgpu_ras_boot_time_error_reporting(struct amdgpu_device *adev,
 
      socket_id = AMDGPU_RAS_GPU_ERR_SOCKET_ID(boot_error);
      aid_id = AMDGPU_RAS_GPU_ERR_AID_ID(boot_error);
-     hbm_id = AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error);
+     hbm_id = ((1 == AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error)) ? 0 : 1);
 
      if (AMDGPU_RAS_GPU_ERR_MEM_TRAINING(boot_error))
              dev_info(adev->dev,

--
2.17.1