drm/amdgpu: Add ras module eeprom safety watermark check

Add ras module eeprom safety watermark check.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
YiPeng Chai
2025-03-26 18:03:49 +08:00
committed by Alex Deucher
parent 43a90c0732
commit 04226ae1bc

View File

@@ -32,6 +32,7 @@
#include <linux/uaccess.h>
#include "amdgpu_reset.h"
#include "amdgpu_ras_mgr.h"
/* These are memory addresses as would be seen by one or more EEPROM
* chips strung on the I2C bus, usually by manipulating pins 1-3 of a
@@ -556,6 +557,9 @@ bool amdgpu_ras_eeprom_check_err_threshold(struct amdgpu_device *adev)
{
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
if (amdgpu_uniras_enabled(adev))
return amdgpu_ras_mgr_check_eeprom_safety_watermark(adev);
if (!__is_ras_eeprom_supported(adev) ||
!amdgpu_bad_page_threshold)
return false;