drm/amd/ras: add support for umc v13
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: add support for umc v13
From: Gangliang Xie <[email protected]>
add uniras support for umc v13
--- drivers/gpu/drm/amd/ras/core/Makefile | 1 + drivers/gpu/drm/amd/ras/core/ras_umc.c | 4 + drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.c | 221 +++++++++++++++++++ drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.h | 70 ++++++ 4 files changed, 296 insertions(+) create mode 100644 drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.c create mode 100644 drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.h
drivers/gpu/drm/amd/ras/core/Makefile +1 -0
@@ -30,6 +30,7 @@ RAS_CORE_FILES = core.o \ eeprom.o \ ras_umc.o \ ras_umc_v12_0.o \ + ras_umc_v13_0.o \ ras_umc_v15_0.o \ cmd.o \ ras_gfx.o \
drivers/gpu/drm/amd/ras/core/ras_umc.c +4 -0
@@ -24,6 +24,7 @@#include "ras.h" #include "ras_umc.h" #include "ras_umc_v12_0.h" +#include "ras_umc_v13_0.h" #include "ras_umc_v15_0.h" #define MAX_ECC_NUM_PER_RETIREMENT 16
@@ -80,6 +81,9 @@ static const struct ras_umc_ip_func *ras_umc_get_ip_func(case IP_VERSION (15 ,0 ,0 ): ras_umc->max_pages_per_row =128 ;return &ras_umc_func_v15_0; +case IP_VERSION (13 ,1 ,0 ): + ras_umc->max_pages_per_row =128 ; +return &ras_umc_func_v13_0;default :RAS_DEV_ERR (ras_core->dev,"UMC ip version(0x%x) is not supported!\n" , ip_version);
drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.c new file +221 -0
221 lines not on this page · raw message
drivers/gpu/drm/amd/ras/core/ras_umc_v13_0.h new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: add support for psp v15_0_3
From: Gangliang Xie <[email protected]>
add uniras support for psp v15_0_3
--- drivers/gpu/drm/amd/ras/core/ras_psp.c | 1 + drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/ras/core/ras_psp.c +1 -0
@@ -47,6 +47,7 @@ static const struct ras_psp_ip_func *ras_psp_get_ip_funcs(case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):return &ras_psp_v13_0; +case IP_VERSION (15 ,0 ,3 ):case IP_VERSION (15 ,0 ,8 ):return &ras_psp_v15_0;default :
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +4 -3
@@ -336,9 +336,10 @@ int amdgpu_ras_mgr_sw_init(struct amdgpu_device *adev, struct ras_module_param *if (param && !param->ras_feature_enable)return 0 ;else if (amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,14 ) || -amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,12 ) || -amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,6 ) || -amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (15 ,0 ,8 )) +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,12 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,6 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (15 ,0 ,3 ) || +amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (15 ,0 ,8 )) con->uniras_enabled = true;else return 0 ;
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: add support for smu v15_0_3
In reply to Alex DeucherFrom: Gangliang Xie <[email protected]>
add uniras support for smu_v15_0_3
--- drivers/gpu/drm/amd/ras/core/ras_mp1.c | 1 + drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/ras/core/ras_mp1.c +1 -0
@@ -36,6 +36,7 @@ static const struct ras_mp1_ip_func *ras_mp1_get_ip_funcs(case IP_VERSION (13 ,0 ,12 ):return &mp1_ras_func_v13_0;case IP_VERSION (15 ,0 ,8 ): +case IP_VERSION (15 ,0 ,3 ):return &mp1_ras_func_v15_0;default : RAS_DEV_ERR(ras_core->dev,
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
@@ -165,6 +165,7 @@ static int amdgpu_ras_mgr_init_mp1_config(struct amdgpu_device *adev,case IP_VERSION (13 ,0 ,14 ):case IP_VERSION (13 ,0 ,12 ):case IP_VERSION (15 ,0 ,8 ): +case IP_VERSION (15 ,0 ,3 ): mp1_cfg->mp1_sys_fn = &amdgpu_ras_mp1_sys_func;break ;default :
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: add support for nbio v7_10_0
In reply to Alex DeucherFrom: Gangliang Xie <[email protected]>
add uniras support for nbio v7_10_0
--- drivers/gpu/drm/amd/ras/core/ras_nbio.c | 3 +++ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/ras/core/ras_nbio.c +3 -0
@@ -36,6 +36,9 @@ static const struct ras_nbio_ip_func *ras_nbio_get_ip_funcs(case IP_VERSION (6 ,3 ,2 ):/* TBD for dGPU */ break ; +case IP_VERSION (7 ,10 ,0 ): +/* TBD for dGPU */ +break ;default :RAS_DEV_ERR (ras_core->dev,"NBIO ip version(0x%x) is not supported!\n" , ip_version);
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -0
@@ -193,6 +193,9 @@ static int amdgpu_ras_mgr_init_nbio_config(struct amdgpu_device *adev,case IP_VERSION (6 ,3 ,2 )://TBD for dGPU break ; +case IP_VERSION (7 ,10 ,0 ): +//TBD for dGPU +break ;default : RAS_DEV_ERR(adev, "The nbio(0x%x) ras config is not right!\n",
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: use PCRU0 C2PMSG for Uniras on psp v15_0_3
In reply to Alex DeucherFrom: Candice Li <[email protected]>
Add a dedicated ras_psp_v15_0_3 ip_func using PCRU0 C2PMSG_67/127 for psp ring wptr and RAS capability query.
--- drivers/gpu/drm/amd/ras/core/Makefile | 1 + drivers/gpu/drm/amd/ras/core/ras_psp.c | 2 + .../gpu/drm/amd/ras/core/ras_psp_v15_0_3.c | 114 ++++++++++++++++++ .../gpu/drm/amd/ras/core/ras_psp_v15_0_3.h | 31 +++++ 4 files changed, 148 insertions(+) create mode 100644 drivers/gpu/drm/amd/ras/core/ras_psp_v15_0_3.c create mode 100644 drivers/gpu/drm/amd/ras/core/ras_psp_v15_0_3.h
drivers/gpu/drm/amd/ras/core/Makefile +1 -0
@@ -44,6 +44,7 @@ RAS_CORE_FILES = core.o \ ras_psp.o \ ras_psp_v13_0.o \ ras_psp_v15_0.o \ + ras_psp_v15_0_3.o \ eeprom_fw.o \ ras_mce.o
drivers/gpu/drm/amd/ras/core/ras_psp.c +2 -0
@@ -26,6 +26,7 @@#include "ras_psp.h" #include "ras_psp_v13_0.h" #include "ras_psp_v15_0.h" +#include "ras_psp_v15_0_3.h" /* position of instance value in sub_block_index of * ta_ras_trigger_error_input, the sub block uses lower 12 bits
@@ -48,6 +49,7 @@ static const struct ras_psp_ip_func *ras_psp_get_ip_funcs(case IP_VERSION (13 ,0 ,12 ):return &ras_psp_v13_0;case IP_VERSION (15 ,0 ,3 ): +return &ras_psp_v15_0_3;case IP_VERSION (15 ,0 ,8 ):return &ras_psp_v15_0;default :
drivers/gpu/drm/amd/ras/core/ras_psp_v15_0_3.c new file +114 -0
114 lines not on this page · raw message
drivers/gpu/drm/amd/ras/core/ras_psp_v15_0_3.h new file +31 -0
@@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: MIT */ +/* +* Copyright 2026 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef __RAS_PSP_V15_0_3_H__ +#define __RAS_PSP_V15_0_3_H__ +#include "ras_psp.h" + +extern const struct ras_psp_ip_func ras_psp_v15_0_3; + +#endif
Signature · 1 line
2.55.0
Alex Deucher
maintainerPATCH 1/1 drm/amd/ras: add support for GC 13
In reply to Alex DeucherFrom: Gangliang Xie <[email protected]>
add uniras support for GC 13
--- drivers/gpu/drm/amd/ras/core/ras_gfx.c | 3 +++ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/core/ras_gfx.c +3 -0
@@ -38,6 +38,9 @@ static const struct ras_gfx_ip_func *ras_gfx_get_ip_funcs(case IP_VERSION (12 ,1 ,0 ):/* TBD */ break ; +case IP_VERSION (13 ,0 ,1 ): +/* TBD */ +break ;default :RAS_DEV_ERR (ras_core->dev,"GFX ip version(0x%x) is not supported!\n" , ip_version);
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +9 -1
@@ -41,6 +41,9 @@#define MAX_AID_NUM_PER_SOCKET_GFX12 16#define MAX_XCD_NUM_PER_AID_GFX12 4 +#define MAX_AID_NUM_PER_SOCKET_GFX13 1 +#define MAX_XCD_NUM_PER_AID_GFX13 1 +/* Reserve 8 physical dram row for possible retirement. * In worst cases, it will lose 8 * 2MB memory in vram domain */
@@ -115,6 +118,10 @@ static int amdgpu_ras_mgr_init_aca_config(struct amdgpu_device *adev, aca_cfg->aid_num_per_socket =MAX_AID_NUM_PER_SOCKET_GFX12 ; aca_cfg->xcd_num_per_aid =MAX_XCD_NUM_PER_AID_GFX12 ;break ; +case IP_VERSION (13 ,0 ,1 ): + aca_cfg->aid_num_per_socket =MAX_AID_NUM_PER_SOCKET_GFX13 ; + aca_cfg->xcd_num_per_aid =MAX_XCD_NUM_PER_AID_GFX13 ; +break ;default :return -EINVAL ; }
@@ -281,7 +288,8 @@ static struct ras_core_context *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev init_config.nbio_ip_version =amdgpu_ip_version (adev,NBIO_HWIP ,0 ); init_config.psp_ip_version =amdgpu_ip_version (adev,MP0_HWIP ,0 ); -if (init_config.gfx_ip_version ==IP_VERSION (12 ,1 ,0 )) +if (init_config.gfx_ip_version ==IP_VERSION (12 ,1 ,0 ) || + init_config.gfx_ip_version ==IP_VERSION (13 ,0 ,1 )) init_config.aca_ip_version =IP_VERSION (5 ,0 ,0 );else if (init_config.umc_ip_version ==IP_VERSION (12 ,0 ,0 ) || init_config.umc_ip_version ==IP_VERSION (12 ,5 ,0 ))
Signature · 1 line
2.55.0