mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-23 10:45:57 -04:00
drm/amdgpu: retire legacy PMFW RAS eeprom write skip
Remove the legacy logic that skips eeprom writes for PMFW-managed RAS data Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Ce Sun <cesun102@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -124,8 +124,6 @@
|
||||
RAS_TABLE_V2_1_INFO_SIZE) \
|
||||
/ RAS_TABLE_RECORD_SIZE)
|
||||
|
||||
#define RAS_SMU_MESSAGE_TIMEOUT_MS 1000 /* 1s */
|
||||
|
||||
/* Given a zero-based index of an EEPROM RAS record, yields the EEPROM
|
||||
* offset off of RAS_TABLE_START. That is, this is something you can
|
||||
* add to control->i2c_address, and then tell I2C layer to read
|
||||
@@ -878,44 +876,6 @@ amdgpu_ras_eeprom_update_header(struct amdgpu_ras_eeprom_control *control)
|
||||
return res;
|
||||
}
|
||||
|
||||
int amdgpu_ras_eeprom_update_record_num(struct amdgpu_ras_eeprom_control *control)
|
||||
{
|
||||
struct amdgpu_device *adev = to_amdgpu_device(control);
|
||||
int ret, retry = 20;
|
||||
|
||||
if (!amdgpu_ras_smu_eeprom_supported(adev))
|
||||
return 0;
|
||||
|
||||
control->ras_num_recs_old = control->ras_num_recs;
|
||||
|
||||
do {
|
||||
/* 1000ms timeout is long enough, smu_get_badpage_count won't
|
||||
* return -EBUSY before timeout.
|
||||
*/
|
||||
ret = amdgpu_ras_smu_get_badpage_count(adev,
|
||||
&(control->ras_num_recs), RAS_SMU_MESSAGE_TIMEOUT_MS);
|
||||
if (!ret &&
|
||||
(control->ras_num_recs_old == control->ras_num_recs)) {
|
||||
/* record number update in PMFW needs some time,
|
||||
* smu_get_badpage_count may return immediately without
|
||||
* count update, sleep for a while and retry again.
|
||||
*/
|
||||
msleep(50);
|
||||
retry--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} while (retry);
|
||||
|
||||
/* no update of record number is not a real failure,
|
||||
* don't print warning here
|
||||
*/
|
||||
if (!ret && (control->ras_num_recs_old == control->ras_num_recs))
|
||||
ret = -EINVAL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_ras_eeprom_append -- append records to the EEPROM RAS table
|
||||
* @control: pointer to control structure
|
||||
@@ -934,11 +894,10 @@ int amdgpu_ras_eeprom_append(struct amdgpu_ras_eeprom_control *control,
|
||||
const u32 num)
|
||||
{
|
||||
struct amdgpu_device *adev = to_amdgpu_device(control);
|
||||
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
||||
int res, i;
|
||||
uint64_t nps = AMDGPU_NPS1_PARTITION_MODE;
|
||||
|
||||
if (!__is_ras_eeprom_supported(adev) || !con)
|
||||
if (!__is_ras_eeprom_supported(adev))
|
||||
return 0;
|
||||
|
||||
if (num == 0) {
|
||||
|
||||
@@ -82,7 +82,6 @@ struct amdgpu_ras_eeprom_control {
|
||||
/* Number of records in the table.
|
||||
*/
|
||||
u32 ras_num_recs;
|
||||
u32 ras_num_recs_old;
|
||||
|
||||
/* the bad page number is ras_num_recs or
|
||||
* ras_num_recs * umc.retire_unit
|
||||
@@ -191,8 +190,6 @@ int amdgpu_ras_eeprom_read_idx(struct amdgpu_ras_eeprom_control *control,
|
||||
struct eeprom_table_record *record, u32 rec_idx,
|
||||
const u32 num);
|
||||
|
||||
int amdgpu_ras_eeprom_update_record_num(struct amdgpu_ras_eeprom_control *control);
|
||||
|
||||
void amdgpu_ras_check_bad_page_status(struct amdgpu_device *adev);
|
||||
|
||||
extern const struct file_operations amdgpu_ras_debugfs_eeprom_size_ops;
|
||||
|
||||
Reference in New Issue
Block a user