<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="Times New Roman" size="3"><span style="font-size:12pt;"><a name="_msipheader87abd423"></a>
<div><font face="Arial" size="2" color="#317100"><span style="font-size:10pt;">[AMD Public Use]<br>

</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Hi 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;">Thanks for your suggestion.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Feedback inline.</span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Regards,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Guchun</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="DengXian" size="2"><span style="font-size:11pt;">_____________________________________________<br>

<b>From:</b> Zhang, Hawking <Hawking.Zhang@amd.com> <br>

<b>Sent:</b> Wednesday, March 11, 2020 10:33 AM<br>

<b>To:</b> Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Li, Dennis <Dennis.Li@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Clements, John <John.Clements@amd.com><br>

<b>Subject:</b> RE: [PATCH] drm/amdgpu: update ras support capability with different sram ecc configuration</span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<a name="_msipheadera92e061b"></a>
<div><font face="Arial" size="2" color="#0078D7"><span style="font-size:10pt;">[AMD Official Use Only - Internal Distribution Only]<br>

</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> Oops, update the format to make it more readable.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> </span></font></div>
<ol style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>Disallow sriov guest/vf driver.</li></span></font>
</ol>
<div style="padding-left:18pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]Current code has it.</span></font></div>
<div style="padding-left:18pt;"><font size="2"><span style="font-size:11pt;"> </span></font></div>
<ol start="2" style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>Only include ASIC families that has server skus</li></span></font>
</ol>
<div style="padding-left:18pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]Current we only allow asics Vega20 and Arcturus for ras init.</span></font></div>
<div style="padding-left:18pt;"><font size="2"><span style="font-size:11pt;"> </span></font></div>
<ol start="3" style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>disable all the IP block RAS if amdgpu_ras_enable == 0</li></span></font>
</ol>
<div style="padding-left:18pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]This patch includes this logic. When amdgu_ras_enable, ras->supported will be set to be 0. No IP block will init ras corresponding code.</span></font></div>
<div style="padding-left:18pt;"><font size="2"><span style="font-size:11pt;"> </span></font></div>
<ol start="4" style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>Check HBM ECC flag</li></span></font>
</ol>
<ol style="margin:0;padding-left:72pt;list-style-type:lower-alpha;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>explicitly inform users on the availability of this capability</li><li>if HBM ECC is not supported, disable UMC/DF RAS in amdgpu_ras_mask</li></span></font>
</ol>
<div style="padding-left:18pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]This is missed. I will update to cover this. </span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<ol start="5" style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>Check SRAM ECC flag</li></span></font>
</ol>
<ol start="3" style="margin:0;padding-left:72pt;list-style-type:lower-alpha;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>explicitly inform users on the availability of this capability</li><li>if SRAM ECC flag is not supported, disable other IP Blocks in amdgpu_ras_mask</li></span></font>
</ol>
<div style="padding-left:18pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]Current patch has done this.</span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<ol start="6" style="margin:0;padding-left:36pt;list-style-type:decimal;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>Remove the redundant RAS atombios query in gmc_v9_0_late_init for VEGA20/ARCTURUS</li></span></font>
</ol>
<ol start="5" style="margin:0;padding-left:72pt;list-style-type:lower-alpha;">
<font face="Calibri" size="2"><span style="font-size:11pt;">
<li>for Vega10 (legacy RAS), we have to keep inform user on RAS capability and apply DF workaround</li><li>we can try to merge vega10 as well but that can be next step.</li></span></font>
</ol>
<div style="text-indent:36pt;"><font face="Calibri" size="2"><span style="font-size:11pt;">[Guchun]Sure. I will send another patch to achieve this.</span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Regards,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Hawking</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">-----Original Message-----<br>

From: Zhang, Hawking <<a href="mailto:Hawking.Zhang@amd.com"><font color="#0563C1"><u>Hawking.Zhang@amd.com</u></font></a>>
<br>

Sent: Wednesday, March 11, 2020 10:31<br>

To: Zhang, Hawking <<a href="mailto:Hawking.Zhang@amd.com"><font color="#0563C1"><u>Hawking.Zhang@amd.com</u></font></a>>; Chen, Guchun <<a href="mailto:Guchun.Chen@amd.com"><font color="#0563C1"><u>Guchun.Chen@amd.com</u></font></a>>; <a href="mailto:amd-gfx@lists.freedesktop.org"><font color="#0563C1"><u>amd-gfx@lists.freedesktop.org</u></font></a>;
Li, Dennis <<a href="mailto:Dennis.Li@amd.com"><font color="#0563C1"><u>Dennis.Li@amd.com</u></font></a>>; Zhou1, Tao <<a href="mailto:Tao.Zhou1@amd.com"><font color="#0563C1"><u>Tao.Zhou1@amd.com</u></font></a>>; Clements, John <<a href="mailto:John.Clements@amd.com"><font color="#0563C1"><u>John.Clements@amd.com</u></font></a>><br>

Subject: RE: [PATCH] drm/amdgpu: update ras support capability with different sram ecc configuration</span></font></div>
<div><font 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 - Internal Distribution Only]</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 one more check.</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;">1). Disallow sriov guest/vf driver.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">2). Only include ASIC families that has server skus 3). disable all the IP block RAS if amdgpu_ras_enable == 0 4). Check HBM ECC flag</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). explicitly inform users on the availability of this capability</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). if HBM ECC is not supported, disable UMC/DF RAS in amdgpu_ras_mask 5). Check SRAM ECC flag</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). explicitly inform users on the availability of this capability</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). if SRAM ECC flag is not supported, disable other IP Blocks in amdgpu_ras_mask 6). Remove the redundant RAS atombios query in gmc_v9_0_late_init for VEGA20/ARCTURUS</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). for Vega10 (legacy RAS), we have to keep inform user on RAS capability and apply DF workaround</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). we can try to merge vega10 as well but that can be next step.</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,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">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-----</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 Zhang, Hawking</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Sent: Wednesday, March 11, 2020 10:29</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">To: Chen, Guchun <<a href="mailto:Guchun.Chen@amd.com">Guchun.Chen@amd.com</a>>; <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>; Li, Dennis <<a href="mailto:Dennis.Li@amd.com">Dennis.Li@amd.com</a>>;
Zhou1, Tao <<a href="mailto:Tao.Zhou1@amd.com">Tao.Zhou1@amd.com</a>>; Clements, John <<a href="mailto:John.Clements@amd.com">John.Clements@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Subject: RE: [PATCH] drm/amdgpu: update ras support capability with different sram ecc configuration</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 - Internal Distribution Only]</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;">Hi Guchun,</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;">I would suggest we organized the amdgpu_ras_check_supported in following logic</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;">1). Disallow sriov guest/vf driver.</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">2). Only include ASIC families that has server skus 3). Check HBM ECC flag</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). explicitly inform users on the availability of this capability</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). if HBM ECC is not supported, disable UMC/DF RAS in amdgpu_ras_mask 4). Check SRAM ECC flag</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). explicitly inform users on the availability of this capability</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). if SRAM ECC flag is not supported, disable other IP Blocks in amdgpu_ras_mask 5). Remove the redundant RAS atombios query in gmc_v9_0_late_init for VEGA20/ARCTURUS</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        a). for Vega10 (legacy RAS), we have to keep inform user on RAS capability and apply DF workaround</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">        b). we can try to merge vega10 as well but that can be next step.</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,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">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-----</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">From: Chen, Guchun <<a href="mailto:Guchun.Chen@amd.com">Guchun.Chen@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Sent: Wednesday, March 11, 2020 09:57</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>; Zhang, Hawking <<a href="mailto:Hawking.Zhang@amd.com">Hawking.Zhang@amd.com</a>>; Li, Dennis <<a href="mailto:Dennis.Li@amd.com">Dennis.Li@amd.com</a>>;
Zhou1, Tao <<a href="mailto:Tao.Zhou1@amd.com">Tao.Zhou1@amd.com</a>>; Clements, John <<a href="mailto:John.Clements@amd.com">John.Clements@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Cc: Chen, Guchun <<a href="mailto:Guchun.Chen@amd.com">Guchun.Chen@amd.com</a>></span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">Subject: [PATCH] drm/amdgpu: update ras support capability with different sram ecc configuration</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;">When sram ecc is disabled by vbios, ras initialization process in the corrresponding IPs that suppport sram ecc needs to be skipped. So update ras support capability accordingly on top of this
configuration. This capability will block further ras operations to the unsupported IPs.</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: Guchun Chen <<a href="mailto:guchun.chen@amd.com">guchun.chen@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_ras.c | 19 +++++++++++++++++--</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> 1 file changed, 17 insertions(+), 2 deletions(-)</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 b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">index 69b02b9d4131..79be004378fa 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;">@@ -1748,8 +1748,23 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev,</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">                          amdgpu_atomfirmware_sram_ecc_supported(adev)))</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">                 *hw_supported = AMDGPU_RAS_BLOCK_MASK;</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;">-       *supported = amdgpu_ras_enable == 0 ?</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">-                               0 : *hw_supported & amdgpu_ras_mask;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+       if (amdgpu_ras_enable == 0)</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+               *supported = 0;</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+       else {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+               *supported = *hw_supported;</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;">+                * When sram ecc is disabled in vbios, bypass those IP</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+                * blocks that support sram ecc, and only hold UMC and DF.</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_atomfirmware_sram_ecc_supported(adev)) {</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+                       DRM_INFO("Bypass IPs that support sram ecc.\n");</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+                       *supported &= (1 << AMDGPU_RAS_BLOCK__UMC |</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+                                       1 << AMDGPU_RAS_BLOCK__DF);</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;">+               /* ras support needs to align with module parmeter */</span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;">+               *supported &= amdgpu_ras_mask;</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;"> </span></font></div>
<div><font face="Calibri" size="2"><span style="font-size:11pt;"> int amdgpu_ras_init(struct amdgpu_device *adev)</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;">amd-gfx mailing list</span></font></div>
<div><font size="2"><span style="font-size:11pt;"><a href="mailto:amd-gfx@lists.freedesktop.org"><font face="Calibri">amd-gfx@lists.freedesktop.org</font></a></span></font></div>
<div><font size="2"><span style="font-size:11pt;"><a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Chawking.zhang%40amd.com%7C3d2355f98f2444a8327808d7c563f58f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637194905433994263&amp;sdata=tAAbGn2gNN05yUL%2FRIyn%2BSbUcIhu4lUQbcw6YO6cfd0%3D&amp;reserved=0"><font face="Calibri">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Chawking.zhang%40amd.com%7C3d2355f98f2444a8327808d7c563f58f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637194905433994263&amp;sdata=tAAbGn2gNN05yUL%2FRIyn%2BSbUcIhu4lUQbcw6YO6cfd0%3D&amp;reserved=0</font></a></span></font></div>
<div><font size="2"><span style="font-size:11pt;"> </span></font></div>
</span></font>
</body>
</html>