mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
drm/amdgpu: refine aca error cache for xgmi v6.4.0
refine aca error cache for xgmi v6.4.0 Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d8070c4241
commit
62d2aaa7d4
|
|
@ -1039,11 +1039,12 @@ static int xgmi_v6_4_0_aca_bank_generate_report(struct aca_handle *handle, struc
|
||||||
struct aca_bank_report *report, void *data)
|
struct aca_bank_report *report, void *data)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = handle->adev;
|
struct amdgpu_device *adev = handle->adev;
|
||||||
|
struct aca_bank_info info;
|
||||||
const char *error_str;
|
const char *error_str;
|
||||||
u64 status, count;
|
u64 status, count;
|
||||||
int ret, ext_error_code;
|
int ret, ext_error_code;
|
||||||
|
|
||||||
ret = aca_bank_info_decode(bank, &report->info);
|
ret = aca_bank_info_decode(bank, &info);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
@ -1056,18 +1057,21 @@ static int xgmi_v6_4_0_aca_bank_generate_report(struct aca_handle *handle, struc
|
||||||
dev_info(adev->dev, "%s detected\n", error_str);
|
dev_info(adev->dev, "%s detected\n", error_str);
|
||||||
|
|
||||||
count = ACA_REG__MISC0__ERRCNT(bank->regs[ACA_REG_IDX_MISC0]);
|
count = ACA_REG__MISC0__ERRCNT(bank->regs[ACA_REG_IDX_MISC0]);
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACA_SMU_TYPE_UE:
|
case ACA_SMU_TYPE_UE:
|
||||||
report->count[ACA_ERROR_TYPE_UE] = ext_error_code == 0 ? count : 0ULL;
|
count = ext_error_code == 0 ? count : 0ULL;
|
||||||
|
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE, count);
|
||||||
break;
|
break;
|
||||||
case ACA_SMU_TYPE_CE:
|
case ACA_SMU_TYPE_CE:
|
||||||
report->count[ACA_ERROR_TYPE_CE] = ext_error_code == 6 ? count : 0ULL;
|
count = ext_error_code == 6 ? count : 0ULL;
|
||||||
|
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE, count);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct aca_bank_ops xgmi_v6_4_0_aca_bank_ops = {
|
static const struct aca_bank_ops xgmi_v6_4_0_aca_bank_ops = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user