Skip to contentSkip to conversation

drm/amd/ras: add support for umc v13

PATCH New Alex Deucher 1 participant 6 messages Sep 24

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 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
index fb16bacaef2fd..2c73d0405a489 100644
@@ -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
index b3f30da19a78f..aaf98cbee619b 100644
@@ -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
author maintainer
#1 lore raw

PATCH 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
index ed53cd25d6bd3..f7416bf184ede 100644
@@ -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
index 701b696a7836a..e4fc455c6e3f7 100644
@@ -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
author maintainer
#2 lore raw

PATCH 1/1 drm/amd/ras: add support for smu v15_0_3

In reply to Alex Deucher

From: 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
index 4c180027850f4..87e93943b51f8 100644
@@ -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
index 2ae3e8c293167..8633bd56401d2 100644
@@ -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
author maintainer
#3 lore raw

PATCH 1/1 drm/amd/ras: add support for nbio v7_10_0

In reply to Alex Deucher

From: 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
index ca543b2f36791..b69ddb16ed0f9 100644
@@ -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
index 8633bd56401d2..701b696a7836a 100644
@@ -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
author maintainer
#4 lore raw

PATCH 1/1 drm/amd/ras: use PCRU0 C2PMSG for Uniras on psp v15_0_3

In reply to Alex Deucher

From: 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
index 2c73d0405a489..49bac67cb09f9 100644
@@ -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
index f7416bf184ede..11019ee596e69 100644
@@ -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
new file mode 100644
index 0000000000000..2bf870f0a87cb
@@ -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
author maintainer
#5 lore raw

PATCH 1/1 drm/amd/ras: add support for GC 13

In reply to Alex Deucher

From: 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
index e553f1364d6c6..39ae38a89486b 100644
@@ -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
index eb5722a597863..2ae3e8c293167 100644
@@ -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