RE: [PATCH 1/2] drm/amd/ras: tell KFD the reset came from an ECC error

"Zhang, Hawking" <[email protected]>
Newsgroups org.freedesktop.lists.amd-gfx
Message-ID <BYAPR12MB3192250D0AB49003A15097DCFCA02@BYAPR12MB3192.namprd12.prod.outlook.com>
AMD General

Series is

Reviewed-by: Hawking Zhang <[email protected]>

Regards,
Hawking
-----Original Message-----
From: Liu, Xiang(Dean) <[email protected]>
Sent: Monday, August 24, 2026 6:21 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Subject: [PATCH 1/2] drm/amd/ras: tell KFD the reset came from an ECC error

kfd_signal_reset_event() picks between KFD_HW_EXCEPTION_ECC and KFD_HW_EXCEPTION_GPU_HANG from the SRAM ECC flag, and only delivers the memory exception event for the former. Nothing raises that flag on the RAS module paths, so a reset caused by an uncorrectable or a consumed poison error is reported to every process on the device as a plain hang and the runtime carries on instead of tearing the workload down.

Raise it the way the per IP callbacks used to.

Signed-off-by: Xiang Liu <[email protected]>
---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c | 1 +
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c     | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c
index 39452a900615..9dd44fb5b885 100644
--- a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c
+++ b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_process.c
@@ -89,6 +89,7 @@ int amdgpu_ras_process_handle_umc_interrupt(struct amdgpu_device *adev, void *da

 int amdgpu_ras_process_handle_unexpected_interrupt(struct amdgpu_device *adev, void *data)  {
+       kgd2kfd_set_sram_ecc_flag(adev->kfd.dev);
        amdgpu_ras_set_fed(adev, true);
        return amdgpu_ras_mgr_reset_gpu(adev, AMDGPU_RAS_GPU_RESET_MODE1_RESET);
 }
diff --git a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c
index afb539f068c2..081516c46cf8 100644
--- a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c
+++ b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_sys.c
@@ -54,6 +54,8 @@ static int amdgpu_ras_sys_poison_consumption_event(struct ras_core_context *ras_
        if (!req)
                return -EINVAL;

+       kgd2kfd_set_sram_ecc_flag(adev->kfd.dev);
+
        if (req->pasid_fn) {
                pasid_fn = (pasid_notify)req->pasid_fn;
                pasid_fn(adev, req->pasid, req->data);
--
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.