<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Arial" size="2"><span style="font-size:10pt;">
<div style="padding-right:5pt;padding-left:5pt;"><font color="blue">[AMD Official Use Only - General]<br>
</font></div>
<div style="margin-top:5pt;"><font face="Times New Roman" size="3"><span style="font-size:12pt;"><br>
</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Please check my comments inline.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Regards,<br>
Hawking</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">-----Original Message-----<br>
From: Zhang, Morris <Shiwu.Zhang@amd.com> <br>
Sent: Wednesday, January 3, 2024 17:46<br>
To: Zhang, Hawking <Hawking.Zhang@amd.com>; amd-gfx@lists.freedesktop.org; Zhou1, Tao <Tao.Zhou1@amd.com>; Yang, Stanley <Stanley.Yang@amd.com>; Wang, Yang(Kevin) <KevinYang.Wang@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>; Li, Candice <Candice.Li@amd.com><br>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Ma, Le <Le.Ma@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com><br>
Subject: RE: [PATCH v2 3/5] drm/amdgpu: Add ras helper to query boot errors v2</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">[AMD Official Use Only - General]</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">--Brs,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Morris Zhang</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">MLSE Linux ML SRDC</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Ext. 25147</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> -----Original Message-----</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> From: amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org">amd-gfx-bounces@lists.freedesktop.org</a>> On Behalf Of </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Hawking Zhang</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Sent: Tuesday, January 2, 2024 10:08 PM</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> To: <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>; Zhou1, Tao <<a href="mailto:Tao.Zhou1@amd.com">Tao.Zhou1@amd.com</a>>; </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Yang, Stanley <<a href="mailto:Stanley.Yang@amd.com">Stanley.Yang@amd.com</a>>; Wang, Yang(Kevin) </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <<a href="mailto:KevinYang.Wang@amd.com">KevinYang.Wang@amd.com</a>>; Chai, Thomas <<a href="mailto:YiPeng.Chai@amd.com">YiPeng.Chai@amd.com</a>>; Li, </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Candice <<a href="mailto:Candice.Li@amd.com">Candice.Li@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>; Ma, Le </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <<a href="mailto:Le.Ma@amd.com">Le.Ma@amd.com</a>>; Lazar, Lijo <<a href="mailto:Lijo.Lazar@amd.com">Lijo.Lazar@amd.com</a>>; Zhang, Hawking </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> <<a href="mailto:Hawking.Zhang@amd.com">Hawking.Zhang@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Subject: [PATCH v2 3/5] drm/amdgpu: Add ras helper to query boot </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> errors v2</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Add ras helper function to query boot time gpu errors.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> v2: use aqua_vanjaram smn addressing pattern</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> Signed-off-by: Hawking Zhang <<a href="mailto:Hawking.Zhang@amd.com">Hawking.Zhang@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> ---</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 95</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h |</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 15 +++-</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 3 files changed, 110 insertions(+), 1 deletion(-)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> index 616b6c911767..cd91533d641c 100644</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> @@ -1328,6 +1328,7 @@ int emu_soc_asic_init(struct amdgpu_device </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> *adev); #define WREG32_FIELD_OFFSET(reg, offset, field, val) \</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> WREG32(mm##reg + offset, (RREG32(mm##reg + offset) & </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> ~REG_FIELD_MASK(reg, field)) | (val) << REG_FIELD_SHIFT(reg, field))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_GET_REG_FIELD(x, h, l) (((x) & GENMASK_ULL(h, l)) >></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +(l))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> /*</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> * BIOS helpers.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> */</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> index fc42fb6ee191..a901b00d4949 100644</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> @@ -3763,3 +3763,98 @@ int amdgpu_ras_error_statistic_ce_count(struct</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> ras_err_data *err_data,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> return 0;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> }</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define mmMP0_SMN_C2PMSG_92 0x1609C</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define mmMP0_SMN_C2PMSG_126 0x160BE</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +static void amdgpu_ras_boot_time_error_reporting(struct amdgpu_device</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> *adev,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 instance, u32 </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +boot_error) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 socket_id, aid_id, hbm_id;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 reg_data;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u64 reg_addr;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id = AMDGPU_RAS_GPU_ERR_SOCKET_ID(boot_error);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + aid_id = AMDGPU_RAS_GPU_ERR_AID_ID(boot_error);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + hbm_id = AMDGPU_RAS_GPU_ERR_HBM_ID(boot_error);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + /* The pattern for smn addressing in other SOC could be different from</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * the one for aqua_vanjaram. We should revisit the code if the pattern</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * is changed. In such case, replace the aqua_vanjaram implementation</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * with more common helper */</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + reg_addr = (mmMP0_SMN_C2PMSG_92 << 2) +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + aqua_vanjaram_encode_ext_smn_addressing(instance);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + reg_data = amdgpu_device_indirect_rreg_ext(adev, reg_addr);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_err(adev->dev, "socket: %d, aid: %d, firmware boot failed, </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + fw status</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> is 0x%x\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id, reg_data);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_MEM_TRAINING(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, hbm: %d, </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + memory</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> training failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id, hbm_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_FW_LOAD(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, firmware load </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + failed at</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> boot time\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_WAFL_LINK_TRAINING(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, wafl link </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + training</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_XGMI_LINK_TRAINING(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, xgmi link </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + training</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_USR_CP_LINK_TRAINING(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, usr cp link </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + training</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_USR_DP_LINK_TRAINING(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, usr dp link </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + training</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_HBM_MEM_TEST(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, hbm: %d, hbm</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> memory test failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id, hbm_id);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_HBM_BIST_TEST(boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + dev_info(adev->dev, "socket: %d, aid: %d, hbm: %d, hbm </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + bist</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> test failed\n",</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + socket_id, aid_id, hbm_id); }</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +static int amdgpu_ras_wait_for_boot_complete(struct amdgpu_device *adev,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 instance, u32 *boot_error) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 reg_addr;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 reg_data;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + int retry_loop;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + /* The pattern for smn addressing in other SOC could be different from</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * the one for aqua_vanjaram. We should revisit the code if the pattern</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * is changed. In such case, replace the aqua_vanjaram implementation</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + * with more common helper */</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + reg_addr = (mmMP0_SMN_C2PMSG_126 << 2) +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + aqua_vanjaram_encode_ext_smn_addressing(instance);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + for (retry_loop = 0; retry_loop < 1000; retry_loop++) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + reg_data = amdgpu_device_indirect_rreg_ext(adev, reg_addr);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (AMDGPU_RAS_GPU_ERR_BOOT_STATUS(reg_data)) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + *boot_error = reg_data;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + return 0;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + }</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + msleep(1);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + }</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + *boot_error = reg_data;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + return -ETIME;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +}</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +void amdgpu_ras_query_boot_status(struct amdgpu_device *adev, u32</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +num_instances) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 boot_error = 0;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + u32 i;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + for (i = 0; i < num_instances; i++) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + if (amdgpu_ras_wait_for_boot_complete(adev, i, </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + &boot_error))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">I suppose we need to check the boot_error value returned to report them in case that before timeout an error happens, right?</span></font></div>
<div><font face="Calibri" size="2" color="#2F5496"><span style="font-size:11pt;">[Hawking]: We only need to dump the boot_error value if boot status bit is not set to 1 till the time out expired.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + amdgpu_ras_boot_time_error_reporting(adev, i,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> boot_error);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> + }</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +}</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> index 76fb85628716..5785b705c692 100644</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> @@ -32,6 +32,19 @@</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> struct amdgpu_iv_entry;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_MEM_TRAINING(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 0, 0)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_FW_LOAD(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 1, 1)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_WAFL_LINK_TRAINING(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 2, 2)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_XGMI_LINK_TRAINING(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 3, 3)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_USR_CP_LINK_TRAINING(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 4, 4)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_USR_DP_LINK_TRAINING(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 5, 5)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_HBM_MEM_TEST(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 6, 6)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_HBM_BIST_TEST(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 7, 7)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_SOCKET_ID(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 10, 8)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_AID_ID(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 12, 11)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_HBM_ID(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 13, 13)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +#define AMDGPU_RAS_GPU_ERR_BOOT_STATUS(x)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> AMDGPU_GET_REG_FIELD(x, 31, 31)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> #define AMDGPU_RAS_FLAG_INIT_BY_VBIOS (0x1 << 0)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> /* position of instance value in sub_block_index of</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> * ta_ras_trigger_error_input, the sub block uses lower 12 bits @@ </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> -818,5</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +831,5 @@ int amdgpu_ras_error_statistic_ce_count(struct ras_err_data</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> *err_data, int amdgpu_ras_error_statistic_ue_count(struct </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> ras_err_data *err_data,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> struct amdgpu_smuio_mcm_config_info *mcm_info,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> struct ras_err_addr *err_addr, u64 count);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> -</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +void amdgpu_ras_query_boot_status(struct amdgpu_device *adev, u32 </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> +num_instances);</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> #endif</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> --</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">> 2.17.1</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>