mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
drm/amdgpu: reset ras eeprom table when it is invalid
reset ras eeprom table when it is invalid Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
27f5ff9e4a
commit
5c36fd7fc6
@@ -1558,6 +1558,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)
|
||||
unsigned char buf[RAS_TABLE_HEADER_SIZE] = { 0 };
|
||||
struct amdgpu_ras_eeprom_table_header *hdr = &control->tbl_hdr;
|
||||
struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
|
||||
int dev_var = adev->pdev->device & 0xF;
|
||||
uint32_t vram_type = adev->gmc.vram_type;
|
||||
int res;
|
||||
|
||||
if (amdgpu_ras_smu_eeprom_supported(adev))
|
||||
@@ -1597,6 +1599,12 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control)
|
||||
return amdgpu_ras_eeprom_reset_table(control);
|
||||
}
|
||||
|
||||
if (!(adev->flags & AMD_IS_APU) && (dev_var == 0x5) &&
|
||||
(vram_type == AMDGPU_VRAM_TYPE_HBM3E) &&
|
||||
(hdr->version < RAS_TABLE_VER_V3)) {
|
||||
return amdgpu_ras_eeprom_reset_table(control);
|
||||
}
|
||||
|
||||
switch (hdr->version) {
|
||||
case RAS_TABLE_VER_V2_1:
|
||||
case RAS_TABLE_VER_V3:
|
||||
|
||||
Reference in New Issue
Block a user