drm/amd/ras: add error handling for seqno operations

Add error handling for seqno operations.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
YiPeng Chai 2026-05-12 10:18:23 +08:00 committed by Alex Deucher
parent d334319060
commit d35e1086b0
2 changed files with 6 additions and 4 deletions

View File

@ -498,8 +498,10 @@ uint64_t amdgpu_ras_mgr_gen_ras_event_seqno(struct amdgpu_device *adev,
if ((seqno_type == RAS_SEQNO_TYPE_DE) ||
(seqno_type == RAS_SEQNO_TYPE_POISON_CONSUMPTION)) {
ret = ras_core_put_seqno(ras_mgr->ras_core, seqno_type, seq_no);
if (ret)
if (ret) {
RAS_DEV_WARN(adev, "There are too many ras interrupts!");
return 0;
}
}
return seq_no;

View File

@ -196,9 +196,9 @@ uint64_t ras_core_gen_seqno(struct ras_core_context *ras_core,
{
uint64_t seqno = 0;
if (ras_core->sys_fn &&
ras_core->sys_fn->gen_seqno)
ras_core->sys_fn->gen_seqno(ras_core, type, &seqno);
if (ras_core->sys_fn && ras_core->sys_fn->gen_seqno &&
ras_core->sys_fn->gen_seqno(ras_core, type, &seqno))
return 0;
return seqno;
}