[PATCH] drm/amdgpu: Double check UC/PCC when parsing GFX UE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Double checking UC and PCC bits of status register for GFX UE to
avoid unexcepted GFX UE report.

Signed-off-by: Xiang Liu <xiang.liu@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
index c0de682b7774..a4038e92c59e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
@@ -876,10 +876,14 @@ static int gfx_v9_4_3_aca_bank_parser(struct aca_handle *handle,
 				      void *data)
 {
 	struct aca_bank_info info;
-	u64 misc0;
+	u64 misc0, status;
 	u32 instlo;
 	int ret;
 
+	status = bank->regs[ACA_REG_IDX_STATUS];
+	if (!ACA_REG__STATUS__VAL(status))
+		return 0;
+
 	ret = aca_bank_info_decode(bank, &info);
 	if (ret)
 		return ret;
@@ -894,8 +898,8 @@ static int gfx_v9_4_3_aca_bank_parser(struct aca_handle *handle,
 	switch (type) {
 	case ACA_SMU_TYPE_UE:
 		bank->aca_err_type = ACA_ERROR_TYPE_UE;
-		ret = aca_error_cache_log_bank_error(handle, &info,
-						     ACA_ERROR_TYPE_UE, 1ULL);
+		if (ACA_REG__STATUS__UC(status) && ACA_REG__STATUS__PCC(status))
+			ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE, 1);
 		break;
 	case ACA_SMU_TYPE_CE:
 		bank->aca_err_type = ACA_BANK_ERR_CE_DE_DECODE(bank);
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux