drm/amdgpu: Correctly clear GCEA error status
Subsystems (2)
PATCH 1/1 drm/amdgpu: Correctly clear GCEA error status
While clearing GCEA error status, do not clear the bits set by RAS TA.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +7 -3
@@ -1676,13 +1676,14 @@ static void gfx_v9_4_2_reset_ea_err_status(struct amdgpu_device *adev)uint32_t i, j;uint32_t value; - value =REG_SET_FIELD (0 ,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS ,0x1 ); -mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < gfx_v9_4_2_ea_err_status_regs.se_num; i++) {for (j =0 ; j < gfx_v9_4_2_ea_err_status_regs.instance; j++) {gfx_v9_4_2_select_se_sh (adev, i,0 , j); + value =RREG32 (SOC15_REG_ENTRY_OFFSET ( + gfx_v9_4_2_ea_err_status_regs)); + value =REG_SET_FIELD (value,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS ,0x1 );WREG32 (SOC15_REG_ENTRY_OFFSET (gfx_v9_4_2_ea_err_status_regs), value); } }
@@ -1734,6 +1735,7 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev)gfx_v9_4_2_select_se_sh (adev, i,0 , j); reg_value =RREG32 (SOC15_REG_ENTRY_OFFSET ( gfx_v9_4_2_ea_err_status_regs)); +if (REG_GET_FIELD (reg_value,GCEA_ERR_STATUS ,SDP_RDRSP_STATUS ) ||REG_GET_FIELD (reg_value,GCEA_ERR_STATUS ,SDP_WRRSP_STATUS ) ||REG_GET_FIELD (reg_value,GCEA_ERR_STATUS ,SDP_RDRSP_DATAPARITY_ERROR )) {
@@ -1741,7 +1743,9 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev) j, reg_value); }/* clear after read */ -WREG32 (SOC15_REG_ENTRY_OFFSET (gfx_v9_4_2_ea_err_status_regs),0x10 ); + reg_value =REG_SET_FIELD (reg_value,GCEA_ERR_STATUS , +CLEAR_ERROR_STATUS ,0x1 ); +WREG32 (SOC15_REG_ENTRY_OFFSET (gfx_v9_4_2_ea_err_status_regs), reg_value); } }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Joshi, Mukul <[email protected]>
Sent: Wednesday, May 26, 2021 4:20 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Li, Dennis <[email protected]>; Joshi, Mukul <[email protected]>
Subject: [PATCH] drm/amdgpu: Correctly clear GCEA error status
While clearing GCEA error status, do not clear the bits set by RAS TA.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +4 -2
@@ -1676,13 +1676,14 @@ static void gfx_v9_4_2_reset_ea_err_status(struct amdgpu_device *adev)uint32_t i, j;uint32_t value; - value =REG_SET_FIELD (0 ,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS ,0x1 ); -mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < gfx_v9_4_2_ea_err_status_regs.se_num; i++) {for (j =0 ; j < gfx_v9_4_2_ea_err_status_regs.instance; j++) {gfx_v9_4_2_select_se_sh (adev, i,0 , j); + value =RREG32 (SOC15_REG_ENTRY_OFFSET ( + gfx_v9_4_2_ea_err_status_regs)); + value =REG_SET_FIELD (value,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS , +0x1 );WREG32 (SOC15_REG_ENTRY_OFFSET (gfx_v9_4_2_ea_err_status_regs), value); }
}
@@ -1734,6 +1735,7 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev)
gfx_v9_4_2_select_se_sh(adev, i, 0, j);
reg_value = RREG32(SOC15_REG_ENTRY_OFFSET(
gfx_v9_4_2_ea_err_status_regs));
+
if (REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_RDRSP_STATUS) || REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_WRRSP_STATUS) ||
REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_RDRSP_DATAPARITY_ERROR)) { @@ -1741,7 +1743,9 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev)
j, reg_value);
}
/* clear after read */
- WREG32(SOC15_REG_ENTRY_OFFSET(gfx_v9_4_2_ea_err_status_regs), 0x10);
+ reg_value = REG_SET_FIELD(reg_value, GCEA_ERR_STATUS,
+ CLEAR_ERROR_STATUS, 0x1);
+ WREG32(SOC15_REG_ENTRY_OFFSET(gfx_v9_4_2_ea_err_status_regs),
+reg_value);
}
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Regards,
Hawking
-----Original Message-----
From: Joshi, Mukul <[email protected]>
Sent: Wednesday, May 26, 2021 04:20
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Li, Dennis <[email protected]>; Joshi, Mukul <[email protected]>
Subject: [PATCH] drm/amdgpu: Correctly clear GCEA error status
While clearing GCEA error status, do not clear the bits set by RAS TA.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +4 -2
@@ -1676,13 +1676,14 @@ static void gfx_v9_4_2_reset_ea_err_status(struct amdgpu_device *adev)uint32_t i, j;uint32_t value; - value =REG_SET_FIELD (0 ,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS ,0x1 ); -mutex_lock (&adev->grbm_idx_mutex);for (i =0 ; i < gfx_v9_4_2_ea_err_status_regs.se_num; i++) {for (j =0 ; j < gfx_v9_4_2_ea_err_status_regs.instance; j++) {gfx_v9_4_2_select_se_sh (adev, i,0 , j); + value =RREG32 (SOC15_REG_ENTRY_OFFSET ( + gfx_v9_4_2_ea_err_status_regs)); + value =REG_SET_FIELD (value,GCEA_ERR_STATUS ,CLEAR_ERROR_STATUS , +0x1 );WREG32 (SOC15_REG_ENTRY_OFFSET (gfx_v9_4_2_ea_err_status_regs), value); }
}
@@ -1734,6 +1735,7 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev)
gfx_v9_4_2_select_se_sh(adev, i, 0, j);
reg_value = RREG32(SOC15_REG_ENTRY_OFFSET(
gfx_v9_4_2_ea_err_status_regs));
+
if (REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_RDRSP_STATUS) || REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_WRRSP_STATUS) ||
REG_GET_FIELD(reg_value, GCEA_ERR_STATUS, SDP_RDRSP_DATAPARITY_ERROR)) { @@ -1741,7 +1743,9 @@ static void gfx_v9_4_2_query_ea_err_status(struct amdgpu_device *adev)
j, reg_value);
}
/* clear after read */
- WREG32(SOC15_REG_ENTRY_OFFSET(gfx_v9_4_2_ea_err_status_regs), 0x10);
+ reg_value = REG_SET_FIELD(reg_value, GCEA_ERR_STATUS,
+ CLEAR_ERROR_STATUS, 0x1);
+ WREG32(SOC15_REG_ENTRY_OFFSET(gfx_v9_4_2_ea_err_status_regs),
+reg_value);
}
}
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx