mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: Support query ecc cap for aqua_vanjaram
Driver queries umc_info v4_0 to identify ecc cap for aqua_vanjaram Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Candice Li <candice.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
48d02dcba1
commit
e0c5c387ac
@@ -217,6 +217,7 @@ union umc_info {
|
||||
struct atom_umc_info_v3_1 v31;
|
||||
struct atom_umc_info_v3_2 v32;
|
||||
struct atom_umc_info_v3_3 v33;
|
||||
struct atom_umc_info_v4_0 v40;
|
||||
};
|
||||
|
||||
union vram_info {
|
||||
@@ -508,9 +509,8 @@ bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev)
|
||||
|
||||
if (amdgpu_atom_parse_data_header(mode_info->atom_context,
|
||||
index, &size, &frev, &crev, &data_offset)) {
|
||||
umc_info = (union umc_info *)(mode_info->atom_context->bios + data_offset);
|
||||
if (frev == 3) {
|
||||
umc_info = (union umc_info *)
|
||||
(mode_info->atom_context->bios + data_offset);
|
||||
switch (crev) {
|
||||
case 1:
|
||||
umc_config = le32_to_cpu(umc_info->v31.umc_config);
|
||||
@@ -533,6 +533,20 @@ bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev)
|
||||
/* unsupported crev */
|
||||
return false;
|
||||
}
|
||||
} else if (frev == 4) {
|
||||
switch (crev) {
|
||||
case 0:
|
||||
umc_config1 = le32_to_cpu(umc_info->v40.umc_config1);
|
||||
ecc_default_enabled =
|
||||
(umc_config1 & UMC_CONFIG1__ENABLE_ECC_CAPABLE) ? true : false;
|
||||
break;
|
||||
default:
|
||||
/* unsupported crev */
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
/* unsupported frev */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user