<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com><br>
<b>Sent:</b> Monday, April 6, 2020 11:52 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Russell, Kent <Kent.Russell@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Re-enable FRU check for most models v4</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">There is at least 1 VG20 DID that does not have an FRU, and trying to read<br>
that will cause a hang. For now, explicitly support reading the FRU for<br>
Arcturus and for the WKS VG20 DIDs, and skip for everything else.<br>
This re-enables serial number reporting for server cards<br>
<br>
v2: Add ASIC check<br>
v3: Don't default to true for pre-VG20<br>
v4: Use DID instead of parsing the VBIOS<br>
<br>
Signed-off-by: Kent Russell <kent.russell@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 ++++++++++++--<br>
1 file changed, 12 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c<br>
index bfe4259f9508..9d17761721de 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c<br>
@@ -20,6 +20,8 @@<br>
* OTHER DEALINGS IN THE SOFTWARE.<br>
*<br>
*/<br>
+#include <linux/pci.h><br>
+<br>
#include "amdgpu.h"<br>
#include "amdgpu_i2c.h"<br>
#include "smu_v11_0_i2c.h"<br>
@@ -31,8 +33,16 @@<br>
<br>
bool is_fru_eeprom_supported(struct amdgpu_device *adev)<br>
{<br>
- /* TODO: Resolve supported ASIC type */<br>
-<br>
+ /* TODO: Gaming SKUs don't have the FRU EEPROM.<br>
+ * Use this hack to address hangs on modprobe on gaming SKUs<br>
+ * until a proper solution can be implemented by only supporting<br>
+ * it on Arcturus, and the explicit chip IDs for VG20 Server cards<br>
+ */<br>
+ if ((adev->asic_type == CHIP_ARCTURUS) ||<br>
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a0) ||<br>
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a1) ||<br>
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a4))<br>
+ return true;<br>
return false;<br>
}<br>
<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7Cb16b12f4b49f4daadbf108d7da4296b5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637217851859649973&sdata=RRTElSye1BxML4zCiSA1u%2Be6z4NvcgZrI8hPvVXhJTk%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7Cb16b12f4b49f4daadbf108d7da4296b5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637217851859649973&sdata=RRTElSye1BxML4zCiSA1u%2Be6z4NvcgZrI8hPvVXhJTk%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>