OSDN Git Service

drm/amdgpu: validate bad page threshold in ras(v3)
authorGuchun Chen <guchun.chen@amd.com>
Wed, 22 Jul 2020 02:00:27 +0000 (10:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Aug 2020 21:25:58 +0000 (17:25 -0400)
commitc84d46707ebbfc303268e27d5aeb8bb4e6d5b1ff
treea81b4752c33d2278e1cf86f1b6e8587eacbfbacb
parentacc0204cdb8e60d2e57053ed766d8280eb01118b
drm/amdgpu: validate bad page threshold in ras(v3)

Bad page threshold value should be valid in the range between
-1 and max records length of eeprom. It could determine when
saved bad pages exceed threshold value, and proceed corresponding
actions.

v2: When using the default typical value, it should be min
value between typical value and eeprom max records length.

v3: drop the case of setting bad_page_cnt_threshold to be
    0xFFFFFFFF, as it confuses user.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.h