Skip to content

Commit

Permalink
drm/amdgpu: Rename ras table version
Browse files Browse the repository at this point in the history
Rename RAS_TABLE_VER to RAS_TABLE_VER_V1,
move RAS_TABLE_VER_V1 from amdgpu_ras_eeprom.c to amdgpu_ras_eeprom.h.

Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Stanley.Yang authored and Alex Deucher committed Jun 9, 2023
1 parent ea791e7 commit 71c79a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@

/* Table hdr is 'AMDR' */
#define RAS_TABLE_HDR_VAL 0x414d4452
#define RAS_TABLE_VER 0x00010000

/* Bad GPU tag ‘BADG’ */
#define RAS_TABLE_HDR_BAD 0x42414447
Expand Down Expand Up @@ -289,7 +288,7 @@ int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control)
mutex_lock(&control->ras_tbl_mutex);

hdr->header = RAS_TABLE_HDR_VAL;
hdr->version = RAS_TABLE_VER;
hdr->version = RAS_TABLE_VER_V1;
hdr->first_rec_offset = RAS_RECORD_START;
hdr->tbl_size = RAS_TABLE_HEADER_SIZE;

Expand Down Expand Up @@ -575,7 +574,7 @@ amdgpu_ras_eeprom_update_header(struct amdgpu_ras_eeprom_control *control)
control->tbl_hdr.header = RAS_TABLE_HDR_BAD;
}

control->tbl_hdr.version = RAS_TABLE_VER;
control->tbl_hdr.version = RAS_TABLE_VER_V1;
control->tbl_hdr.first_rec_offset = RAS_INDEX_TO_OFFSET(control, control->ras_fri);
control->tbl_hdr.tbl_size = RAS_TABLE_HEADER_SIZE + control->ras_num_recs * RAS_TABLE_RECORD_SIZE;
control->tbl_hdr.checksum = 0;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#include <linux/i2c.h>

#define RAS_TABLE_VER_V1 0x00010000

struct amdgpu_device;

enum amdgpu_ras_eeprom_err_type {
Expand Down

0 comments on commit 71c79a1

Please sign in to comment.