drm/amdgpu: Re-enable FRU check for most models
Subsystems (2)
PATCH 1/1 drm/amdgpu: Re-enable FRU check for most models
There are 2 VG20 SKUs that do not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming SKU until a proper fix can be implemented. This re-enables serial number reporting for server cards
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +14 -2
@@ -31,9 +31,21 @@bool is_fru_eeprom_supported (struct amdgpu_device *adev) { -/* TODO: Resolve supported ASIC type */ +struct atom_context *atom_ctx = adev->mode_info.atom_context; -return false; +if (!atom_ctx) +return false; + +/* TODO: Gaming SKUs don't have the FRU EEPROM. +* Use this to address hangs on modprobe on gaming SKUs +* until a proper solution can be implemented +*/ +if (adev->asic_type ==CHIP_VEGA20 ) +if (strnstr (atom_ctx->vbios_version,"D360" , +sizeof (atom_ctx->vbios_version))) +return false; + +return true; } int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 26 lines · Kent Russell
There are 2 VG20 SKUs that do not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming SKU until a proper fix can be implemented. This re-enables serial number reporting for server cards
Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +4
-2@@ -31,9 +31,21 @@bool is_fru_eeprom_supported (struct amdgpu_device *adev) { -/* TODO: Resolve supported ASIC type */ +struct atom_context *atom_ctx = adev->mode_info.atom_context; -return false; +if (!atom_ctx) +return false; +
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 48
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +10
-0+/* TODO: Gaming SKUs don't have the FRU EEPROM. +* Use this to address hangs on modprobe on gaming SKUs +* until a proper solution can be implemented +*/ +if (adev->asic_type ==CHIP_VEGA20 ) +if (strnstr (atom_ctx->vbios_version,"D360" , +sizeof (atom_ctx->vbios_version))) +return false; + +return true;
I think you want to default to false and only return true if it's a vega20 and it's the right vbios version otherwise we'll try to fetch the info on all asics.
Alex
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-1} int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr, --2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Quoted 41 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, April 3, 2020 12:36 PM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most modelsQuoted 9 lines · Kent Russell
There are 2 VG20 SKUs that do not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming SKU until a proper fix can be implemented. This re-enables serial number reporting for server cards
Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16++++++++++++++--
Quoted 23 lines
1 file changed, 14 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +10
-2@@ -31,9 +31,21 @@bool is_fru_eeprom_supported (struct amdgpu_device *adev) { -/* TODO: Resolve supported ASIC type */ +struct atom_context *atom_ctx = adev->mode_info.atom_context; -return false; +if (!atom_ctx) +return false; + +/* TODO: Gaming SKUs don't have the FRU EEPROM. +* Use this to address hangs on modprobe on gaming SKUs +* until a proper solution can be implemented +*/ +if (adev->asic_type ==CHIP_VEGA20 ) + if (strnstr(atom_ctx->vbios_version, "D360",
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 48
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +4
-0+ sizeof(atom_ctx->vbios_version))) +return false; + +return true;I think you want to default to false and only return true if it's a vega20 and it's the right vbios version otherwise we'll try to fetch the info on all asics.
I was trying to go for the smallest list. There are 2 SKUs in all of VG20 that don't work, and none in Arcturus (and the FRU check is only for VG20+) , so I assumed that I could just cover the 2 bad cases. It's supported on Arcturus, and it's supported on server VG20, and we don't touch it at all on VG10-and-older.
Kent
Quoted 14 lines
Alex
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 50
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0} int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-1--2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
Quoted 6 lines
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=02%7C01%7Ckent.russell%40amd.com%7C0f2e5090b21b4807b 66808d7d7ed28f1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6 37215285907421019&sdata=yBc0%2FrNnnWgRBiJcAvav4JtvmoG0Tyhd6p X6gfFeW%2FU%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 54 lines · Kent
[AMD Official Use Only - Internal Distribution Only]
Quoted 41 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, April 3, 2020 12:36 PM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most modelsQuoted 9 lines · Kent Russell
There are 2 VG20 SKUs that do not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming SKU until a proper fix can be implemented. This re-enables serial number reporting for server cards
Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16++++++++++++++--
Quoted 23 lines
1 file changed, 14 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +10
-2@@ -31,9 +31,21 @@bool is_fru_eeprom_supported (struct amdgpu_device *adev) { -/* TODO: Resolve supported ASIC type */ +struct atom_context *atom_ctx = adev->mode_info.atom_context; -return false; +if (!atom_ctx) +return false; + +/* TODO: Gaming SKUs don't have the FRU EEPROM. +* Use this to address hangs on modprobe on gaming SKUs +* until a proper solution can be implemented +*/ +if (adev->asic_type ==CHIP_VEGA20 ) + if (strnstr(atom_ctx->vbios_version, "D360",Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 48
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +4
-0+ sizeof(atom_ctx->vbios_version))) +return false; + +return true;I think you want to default to false and only return true if it's a vega20 and it's the right vbios version otherwise we'll try to fetch the info on all asics.
Quoted 1 line
I was trying to go for the smallest list. There are 2 SKUs in all of VG20 that don't work, and none in Arcturus (and the FRU check is only for VG20+) , so I assumed that I could just cover the 2 bad cases. It's supported on Arcturus, and it's supported on server VG20, and we don't touch it at all on VG10-and-older.
Right, but if you return true by default, then the driver will try and fetch the FRU stuff from every asic right?
I would do something like:
if ((adev->asic_type == CHIP_VEGA20) ||
(adev->asic_type == CHIP_ARCTURUS) {
/* do whatever logic makes sense here to sort out these asics */
if (...)
return false;
else
return true;
}/* return false for everything else */
return false;
Quoted 24 lines
Kent
Quoted 20 lines
Alex
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 50
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0} int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-1--2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=02%7C01%7Ckent.russell%40amd.com%7C0f2e5090b21b4807b 66808d7d7ed28f1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6 37215285907421019&sdata=yBc0%2FrNnnWgRBiJcAvav4JtvmoG0Tyhd6p X6gfFeW%2FU%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Quoted 77 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, April 3, 2020 12:48 PM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most modelsQuoted 12 lines · Kent
[AMD Official Use Only - Internal Distribution Only]
Quoted 8 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, April 3, 2020 12:36 PM
To: Russell, Kent <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most modelsOn Fri, Apr 3, 2020 at 12:30 PM Kent Russell <[email protected]>
Quoted 43 lines · wrote:
Quoted 34 lines
Quoted 9 lines
There are 2 VG20 SKUs that do not have the FRU on there, and trying to read that will cause a hang. For now, check for the gaming SKU until a proper fix can be implemented. This re-enables serial number reporting for server cards
Signed-off-by Kent Russell <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16++++++++++++++--
Quoted 24 lines
1 file changed, 14 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +11
-2@@ -31,9 +31,21 @@bool is_fru_eeprom_supported (struct amdgpu_device *adev) { -/* TODO: Resolve supported ASIC type */ +struct atom_context *atom_ctx = + adev->mode_info.atom_context; -return false; +if (!atom_ctx) +return false; + +/* TODO: Gaming SKUs don't have the FRU EEPROM. +* Use this to address hangs on modprobe on gaming SKUs +* until a proper solution can be implemented +*/ +if (adev->asic_type ==CHIP_VEGA20 ) + if (strnstr(atom_ctx->vbios_version, "D360",Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 48
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +4
-0+ sizeof(atom_ctx->vbios_version))) +return false; + +return true;I think you want to default to false and only return true if it's a vega20 and it's the right vbios version otherwise we'll try to fetch the info on all asics.
Quoted 1 line
I was trying to go for the smallest list. There are 2 SKUs in all of VG20 that
don't work, and none in Arcturus (and the FRU check is only for VG20+) , so I assumed that I could just cover the 2 bad cases. It's supported on Arcturus, and it's supported on server VG20, and we don't touch it at all on VG10-and-older.
Right, but if you return true by default, then the driver will try and fetch the FRU stuff from every asic right?
I would do something like:
if ((
adev->asic_type==CHIP_VEGA20) ||
(adev->asic_type==CHIP_ARCTURUS) {
/* do whatever logic makes sense here to sort out these asics */
Quoted 9 lines
if (...) return false; else return true; }/* return false for everything else */
return false;
Ah good point! I'll do that now.
Quoted 22 lines
Quoted 22 lines
Kent
Quoted 18 lines
Alex
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c line 51
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-0} int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_taddrptr,
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +0
-1--2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
sts.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd-
Quoted 6 lines
gfx&data=02%7C01%7Ckent.russell%40amd.com%7C0f2e5090b21b4807b
Quoted 1 line
Quoted 1 line
66808d7d7ed28f1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6
Quoted 1 line
Quoted 1 line
37215285907421019&sdata=yBc0%2FrNnnWgRBiJcAvav4JtvmoG0Tyhd6p
Quoted 1 line
Quoted 1 line
X6gfFeW%2FU%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx