aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
diff options
context:
space:
mode:
authorLuben Tuikov <[email protected]>2021-03-11 16:20:15 +0000
committerAlex Deucher <[email protected]>2021-07-01 04:24:40 +0000
commit1fab841ff63d2b94673a46682098d86d67b195e2 (patch)
tree79189e1794a309cb9e0cc9281034714ad04c59af /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
parentdrm/amdgpu: Rename misspelled function (diff)
downloadkernel-1fab841ff63d2b94673a46682098d86d67b195e2.tar.gz
kernel-1fab841ff63d2b94673a46682098d86d67b195e2.zip
drm/amdgpu: RAS xfer to read/write
Wrap amdgpu_ras_eeprom_xfer(..., bool write), into amdgpu_ras_eeprom_read() and amdgpu_ras_eeprom_write(), as that makes reading and understanding the code clearer. Cc: Jean Delvare <[email protected]> Cc: Alexander Deucher <[email protected]> Cc: Andrey Grodzovsky <[email protected]> Cc: Lijo Lazar <[email protected]> Cc: Stanley Yang <[email protected]> Cc: Hawking Zhang <[email protected]> Signed-off-by: Luben Tuikov <[email protected]> Acked-by: Alexander Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ba7eea90b36f..b0a0cae24a84 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1817,10 +1817,9 @@ int amdgpu_ras_save_bad_pages(struct amdgpu_device *adev)
save_count = data->count - control->num_recs;
/* only new entries are saved */
if (save_count > 0) {
- if (amdgpu_ras_eeprom_xfer(control,
- &data->bps[control->num_recs],
- save_count,
- true)) {
+ if (amdgpu_ras_eeprom_write(control,
+ &data->bps[control->num_recs],
+ save_count)) {
dev_err(adev->dev, "Failed to save EEPROM table data!");
return -EIO;
}
@@ -1850,7 +1849,7 @@ static int amdgpu_ras_load_bad_pages(struct amdgpu_device *adev)
if (!bps)
return -ENOMEM;
- if (amdgpu_ras_eeprom_xfer(control, bps, control->num_recs, false)) {
+ if (amdgpu_ras_eeprom_read(control, bps, control->num_recs)) {
dev_err(adev->dev, "Failed to load EEPROM table records!");
ret = -EIO;
goto out;