[PATCH] drm/amdgpu: Re-enable FRU check for most models
Alex Deucher
alexdeucher at gmail.com
Fri Apr 3 16:36:16 UTC 2020
On Fri, Apr 3, 2020 at 12:30 PM Kent Russell <kent.russell at amd.com> wrote:
>
> 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 <kent.russell at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> index bfe4259f9508..9582469a70cb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> @@ -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;
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
> }
>
> int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list