Skip to contentSkip to conversation

drm/amdgpu: Re-enable FRU check for most models v4

PATCH In review Kent Russell 1 participant 2 messages Apr 6, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Re-enable FRU check for most models v4

There is 1 VG20 DID that does not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming DID until a proper fix can be implemented. This re-enables serial number reporting for server cards

v2: Add ASIC check
v3: Don't default to true for pre-VG20
v4: Use DID instead of parsing the VBIOS

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +12 -2
index bfe4259f9508..9d17761721de 100644
@@ -20,6 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
+#include <linux/pci.h>
+
 #include "amdgpu.h"
 #include "amdgpu_i2c.h"
 #include "smu_v11_0_i2c.h"
@@ -31,8 +33,16 @@
 
 bool is_fru_eeprom_supported(struct amdgpu_device *adev)
 {
-	/* TODO: Resolve supported ASIC type */
-
+	/* TODO: Gaming SKUs don't have the FRU EEPROM.
+	 * Use this hack to address hangs on modprobe on gaming SKUs
+	 * until a proper solution can be implemented by only supporting
+	 * it on Arcturus, and the explicit chip IDs for VG20 Server cards
+	 */
+	if ((adev->asic_type == CHIP_ARCTURUS) ||
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a0) ||
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a1) ||
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a4))
+		return true;
 	return false;
 }
 
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

[AMD Official Use Only - Internal Distribution Only]

Ignore this one, needed to update the commit

Kent

Quoted 56 lines

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Monday, April 6, 2020 11:51 AM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4

There is 1 VG20 DID that does not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming DID until a proper fix can be implemented. This re-enables serial number reporting for server cards

v2: Add ASIC check
v3: Don't default to true for pre-VG20
v4: Use DID instead of parsing the VBIOS

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +9 -2
index bfe4259f9508..9d17761721de 100644
@@ -20,6 +20,8 @@
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
+#include <linux/pci.h>
+
 #include "amdgpu.h"
 #include "amdgpu_i2c.h"
 #include "smu_v11_0_i2c.h"
@@ -31,8 +33,16 @@
 
 bool is_fru_eeprom_supported(struct amdgpu_device *adev)  {
-	/* TODO: Resolve supported ASIC type */
-
+	/* TODO: Gaming SKUs don't have the FRU EEPROM.
+	 * Use this hack to address hangs on modprobe on gaming SKUs
+	 * until a proper solution can be implemented by only supporting
+	 * it on Arcturus, and the explicit chip IDs for VG20 Server cards
+	 */
+	if ((adev->asic_type == CHIP_ARCTURUS) ||
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device ==

0x66a0) ||

drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -0
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device ==

0x66a1) ||

drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -0
+	    (adev->asic_type == CHIP_VEGA20 && adev->pdev->device ==

0x66a4))

drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -1
+		return true;
 	return false;
 }
 
--
Quoted 1 line

2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx