[PATCH] drm/amdgpu: Re-enable FRU check for most models v3

Russell, Kent Kent.Russell at amd.com
Fri Apr 3 21:02:38 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

> -----Original Message-----
> From: Alex Deucher <alexdeucher at gmail.com>
> Sent: Friday, April 3, 2020 4:51 PM
> To: Russell, Kent <Kent.Russell at amd.com>
> Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>
> Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most models v3
> 
> On Fri, Apr 3, 2020 at 1:09 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
> >
> > v2: Add ASIC check
> > v3: Don't default to true for pre-VG10
> >
> > Signed-off-by: Kent Russell <kent.russell at amd.com>
> > ---
> >  .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c    | 22
> +++++++++++++++++--
> >  1 file changed, 20 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..508906177cad 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > @@ -31,9 +31,27 @@
> >
> >  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
> > +        */
> > +       switch (adev->asic_type) {
> > +       case CHIP_VEGA20:
> > +               if (strnstr(atom_ctx->vbios_version, "D360",
> > +                               sizeof(atom_ctx->vbios_version)))
> > +                       return false;
> 
> Most skus are separated by pci revision ids.  Maybe it would be more
> reliable to check that than a vbios string?
I can look into that. This was really meant as a temporary workaround until we found the right way to poll the card altogether. I lifted this from John Clements' patch to isolate the D342 variant of Arcturus due to that whole EEPROM addressing thing. I'll see if I can find the revision IDs for those and see if they can be used instead. Maybe I can use that for John's D342 check as well.


> 
> Alex
> 
> 
> > +               return true;
> > +       case CHIP_ARCTURUS:
> > +               /* There are no gaming Arcturus SKUs */
> > +               return true;
> > +       default:
> > +               return false;
> > +       }
> >  }
> >
> >  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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
> eedesktop.org%2Fmailman%2Flistinfo%2Famd-
> gfx&data=02%7C01%7Ckent.russell%40amd.com%7Cd1d72c89825549c6f
> 06e08d7d810c83e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6
> 37215438899199940&sdata=BnHE%2BT8D0j%2BHKD7s9J%2BXePsSYcXLG
> bEYkmawDv3GNbw%3D&reserved=0


More information about the amd-gfx mailing list