diff options
author | 2023-10-20 10:12:07 +0800 | |
---|---|---|
committer | 2023-10-26 18:41:21 -0400 | |
commit | 53d4d7792757d195979a630a6402f272d3fd2a47 (patch) | |
tree | b7800c6e64570565787516fda5dd7f977fac8108 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
parent | drm/amd/display: reprogram det size while seamless boot (diff) | |
download | linux-53d4d7792757d195979a630a6402f272d3fd2a47.tar.gz linux-53d4d7792757d195979a630a6402f272d3fd2a47.tar.bz2 linux-53d4d7792757d195979a630a6402f272d3fd2a47.zip |
drm/amdgpu: fix find ras error node error
the origin function might return the wrong node.
Fixes: 5b1270beb380 ("drm/amdgpu: add ras_err_info to identify RAS error source")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 3c83a2b8fb2c..88e1b47c3d3f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3529,11 +3529,10 @@ static struct ras_err_node *amdgpu_ras_error_find_node_by_id(struct ras_err_data for_each_ras_error(err_node, err_data) { ref_id = &err_node->err_info.mcm_info; - if ((mcm_info->socket_id >= 0 && mcm_info->socket_id != ref_id->socket_id) || - (mcm_info->die_id >= 0 && mcm_info->die_id != ref_id->die_id)) - continue; - return err_node; + if (mcm_info->socket_id == ref_id->socket_id && + mcm_info->die_id == ref_id->die_id) + return err_node; } return NULL; |