Skip to content

Commit 1a88252

Browse files
Stanley.Yangalexdeucher
authored andcommitted
drm/amdgpu: Fix eeprom max record count
The eeprom table is empty before initializing, set eeprom table version first before initializing. Changed from V1: Reuse amdgpu_ras_set_eeprom_table_version function Signed-off-by: Stanley.Yang <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 015b8a2)
1 parent afac8c6 commit 1a88252

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,9 @@ int amdgpu_ras_eeprom_read(struct amdgpu_ras_eeprom_control *control,
10111011

10121012
uint32_t amdgpu_ras_eeprom_max_record_count(struct amdgpu_ras_eeprom_control *control)
10131013
{
1014+
/* get available eeprom table version first before eeprom table init */
1015+
amdgpu_ras_set_eeprom_table_version(control);
1016+
10141017
if (control->tbl_hdr.version == RAS_TABLE_VER_V2_1)
10151018
return RAS_MAX_RECORD_COUNT_V2_1;
10161019
else

0 commit comments

Comments
 (0)