Skip to content

Commit 1349b31

Browse files
Gangliang Xiealexdeucher
authored andcommitted
drm/amdgpu: initialize max record count after table reset
initialize max record count and record offset after table reset Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent a448c40 commit 1349b31

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@ int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control)
459459
hdr->tbl_size = RAS_TABLE_HEADER_SIZE +
460460
RAS_TABLE_V2_1_INFO_SIZE;
461461
rai->rma_status = GPU_HEALTH_USABLE;
462+
463+
control->ras_record_offset = RAS_RECORD_START_V2_1;
464+
control->ras_max_record_count = RAS_MAX_RECORD_COUNT_V2_1;
462465
/**
463466
* GPU health represented as a percentage.
464467
* 0 means worst health, 100 means fully health.
@@ -469,6 +472,9 @@ int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control)
469472
} else {
470473
hdr->first_rec_offset = RAS_RECORD_START;
471474
hdr->tbl_size = RAS_TABLE_HEADER_SIZE;
475+
476+
control->ras_record_offset = RAS_RECORD_START;
477+
control->ras_max_record_count = RAS_MAX_RECORD_COUNT;
472478
}
473479

474480
csum = __calc_hdr_byte_sum(control);

0 commit comments

Comments
 (0)