Commit 5b9de259 authored by Yang Wang's avatar Yang Wang Committed by Alex Deucher

drm/amdgpu: add ras POSION_CREATION event id support

add amdgpu ras POSION_CREATION event id support.
Signed-off-by: default avatarYang Wang <kevinyang.wang@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 75ac6a25
......@@ -2116,8 +2116,17 @@ static void amdgpu_ras_interrupt_poison_consumption_handler(struct ras_manager *
static void amdgpu_ras_interrupt_poison_creation_handler(struct ras_manager *obj,
struct amdgpu_iv_entry *entry)
{
dev_info(obj->adev->dev,
"Poison is created\n");
struct amdgpu_device *adev = obj->adev;
enum ras_event_type type = RAS_EVENT_TYPE_POISON_CREATION;
u64 event_id;
int ret;
ret = amdgpu_ras_mark_ras_event(adev, type);
if (ret)
return;
event_id = amdgpu_ras_acquire_event_id(adev, type);
RAS_EVENT_LOG(adev, event_id, "Poison is created\n");
if (amdgpu_ip_version(obj->adev, UMC_HWIP, 0) >= IP_VERSION(12, 0, 0)) {
struct amdgpu_ras *con = amdgpu_ras_get_context(obj->adev);
......@@ -2889,6 +2898,7 @@ static int amdgpu_ras_poison_creation_handler(struct amdgpu_device *adev,
uint32_t new_detect_count, total_detect_count;
uint32_t need_query_count = poison_creation_count;
bool query_data_timeout = false;
enum ras_event_type type = RAS_EVENT_TYPE_POISON_CREATION;
memset(&info, 0, sizeof(info));
info.head.block = AMDGPU_RAS_BLOCK__UMC;
......@@ -2896,7 +2906,7 @@ static int amdgpu_ras_poison_creation_handler(struct amdgpu_device *adev,
ecc_log = &ras->umc_ecc_log;
total_detect_count = 0;
do {
ret = amdgpu_ras_query_error_status(adev, &info);
ret = amdgpu_ras_query_error_status_with_event(adev, &info, type);
if (ret)
return ret;
......@@ -3975,6 +3985,7 @@ u64 amdgpu_ras_acquire_event_id(struct amdgpu_device *adev, enum ras_event_type
switch (type) {
case RAS_EVENT_TYPE_FATAL:
case RAS_EVENT_TYPE_POISON_CREATION:
event_mgr = __get_ras_event_mgr(adev);
if (!event_mgr)
return RAS_EVENT_INVALID_ID;
......
......@@ -435,6 +435,7 @@ struct umc_ecc_info {
enum ras_event_type {
RAS_EVENT_TYPE_INVALID = 0,
RAS_EVENT_TYPE_FATAL,
RAS_EVENT_TYPE_POISON_CREATION,
RAS_EVENT_TYPE_COUNT,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment