drm/amdgpu: Re-enable FRU check for most models v4
Subsystems (2)
PATCH 1/1 drm/amdgpu: Re-enable FRU check for most models v4
There is at least 1 VG20 DID that does not have an FRU, and trying to read that will cause a hang. For now, explicitly support reading the FRU for Arcturus and for the WKS VG20 DIDs, and skip for everything else. 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
@@ -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
[AMD Official Use Only - Internal Distribution Only]
Sorry for the double-send, this was the right one to send out.
Kent
Quoted 57 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Monday, April 6, 2020 11:53 AM
To: [email protected]
Cc: Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4There is at least 1 VG20 DID that does not have an FRU, and trying to read that will cause a hang. For now, explicitly support reading the FRU for Arcturus and for the WKS VG20 DIDs, and skip for everything else.
This re-enables serial number reporting for server cardsv2: Add ASIC check
v3: Don't default to true for pre-VG20
v4: Use DID instead of parsing the VBIOSSigned-off-by Kent Russell <[email protected]>--- 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@@ -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
[AMD Official Use Only - Internal Distribution Only]
________________________________
From: amd-gfx <[email protected]> on behalf of Kent Russell <[email protected]>
Sent: Monday, April 6, 2020 11:52 AM
To: [email protected] <[email protected]>
Cc: Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4
There is at least 1 VG20 DID that does not have an FRU, and trying to read that will cause a hang. For now, explicitly support reading the FRU for Arcturus and for the WKS VG20 DIDs, and skip for everything else. 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
@@ -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; }
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi,
After applying this patch I have seen the following error:
In file included from ./include/linux/uuid.h:12,
from ./include/linux/mod_devicetable.h:13,
from ./include/linux/pci.h:27,
from drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:23:
In function ‘memcpy’,
inlined from ‘amdgpu_fru_get_product_info’ at drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c:137:2:
./include/linux/string.h:376:4: error: call to ‘__read_overflow2’ declared with attribute error: detected read beyond size of object passed as 2nd parameter
376 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~ make[4]: *** [scripts/Makefile.build:266: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.o] Error 1 make[4]: *** Waiting for unfinished jobs....
Did I miss something?
P.s: I'm using gcc 9.3.0 (Arch Linux 9.3.0-1)
Best Regards
Quoted 68 lines · Alexander
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by Alex Deucher <[email protected]>________________________________
From: amd-gfx <[email protected]> on behalf of Kent Russell <[email protected]>
Sent: Monday, April 6, 2020 11:52 AM
To: [email protected] <[email protected]>
Cc: Russell, Kent <[email protected]>
Subject: [PATCH] drm/amdgpu: Re-enable FRU check for most models v4There is at least 1 VG20 DID that does not have an FRU, and trying to read that will cause a hang. For now, explicitly support reading the FRU for Arcturus and for the WKS VG20 DIDs, and skip for everything else. 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 VBIOSSigned-off-by Kent Russell <[email protected]>--- 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
-3@@ -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; } --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208800660&sdata=EMsjck3eT5RA19qGVLjoFVaX25zgPq8axwUxSR4HyOY%3D&reserved=0_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CRodrigo.Siqueira%40amd.com%7C94ab725894bf4069999508d7daf6a1a7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637218625208840485&sdata=9ZL1XLDOi2qBIMV8obDmCIB1G6PKi%2FXegRfFDZtfMfA%3D&reserved=0
Signature · 2 lines
Rodrigo Siqueira https://siqueira.tech
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx