summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
diff options
context:
space:
mode:
authorLuben Tuikov <luben.tuikov@amd.com>2021-06-16 13:09:37 -0400
committerAlex Deucher <alexander.deucher@amd.com>2021-07-01 00:24:41 -0400
commit0686627b3fb2718bb0a6a0e1cd2d0e3dcbe97623 (patch)
tree94113b59f6d601bd069a519d25e0315e20ee6db3 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
parentd7edde3dea08ee2ea863d5d00d322db03efc3de0 (diff)
downloadlinux-0686627b3fb2718bb0a6a0e1cd2d0e3dcbe97623.tar.gz
linux-0686627b3fb2718bb0a6a0e1cd2d0e3dcbe97623.tar.bz2
linux-0686627b3fb2718bb0a6a0e1cd2d0e3dcbe97623.zip
drm/amdgpu: Some renames
Qualify with "ras_". Use kernel's own--don't redefine your own. Cc: Alexander Deucher <Alexander.Deucher@amd.com> Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Alexander Deucher <Alexander.Deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
index 504729b80537..9e1e7656b7bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
@@ -40,14 +40,27 @@ struct amdgpu_ras_eeprom_table_header {
uint32_t first_rec_offset;
uint32_t tbl_size;
uint32_t checksum;
-}__attribute__((__packed__));
+} __packed;
struct amdgpu_ras_eeprom_control {
struct amdgpu_ras_eeprom_table_header tbl_hdr;
- u32 i2c_address; /* Base I2C 19-bit memory address */
+
+ /* Base I2C EEPPROM 19-bit memory address,
+ * where the table is located. For more information,
+ * see top of amdgpu_eeprom.c.
+ */
+ u32 i2c_address;
+
uint32_t next_addr;
- unsigned int num_recs;
- struct mutex tbl_mutex;
+
+ /* Number of records in the table.
+ */
+ unsigned int ras_num_recs;
+
+ /* Protect table access via this mutex.
+ */
+ struct mutex ras_tbl_mutex;
+
u8 tbl_byte_sum;
};
@@ -74,10 +87,10 @@ struct eeprom_table_record {
unsigned char mem_channel;
unsigned char mcumc_id;
-}__attribute__((__packed__));
+} __packed;
int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control,
- bool *exceed_err_limit);
+ bool *exceed_err_limit);
int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control);
bool amdgpu_ras_eeprom_check_err_threshold(struct amdgpu_device *adev);