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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 3, 2020 at 12:41 PM Russell, Kent <Kent.Russell@xxxxxxx> wrote:
>
> [AMD Official Use Only - Internal Distribution Only]
>
>
> > -----Original Message-----
> > From: Alex Deucher <alexdeucher@xxxxxxxxx>
> > Sent: Friday, April 3, 2020 12:36 PM
> > To: Russell, Kent <Kent.Russell@xxxxxxx>
> > Cc: amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
> > Subject: Re: [PATCH] drm/amdgpu: Re-enable FRU check for most models
> >
> > On Fri, Apr 3, 2020 at 12:30 PM Kent Russell <kent.russell@xxxxxxx> 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@xxxxxxx>
> > > ---
> > >  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.
>
> 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;

>
>  Kent
>
>
> >
> > Alex
> >
> > >  }
> > >
> > >  int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t
> > addrptr,
> > > --
> > > 2.17.1
> > >
> > > _______________________________________________
> > > amd-gfx mailing list
> > > amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> > >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
> > eedesktop.org%2Fmailman%2Flistinfo%2Famd-
> > gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C0f2e5090b21b4807b
> > 66808d7d7ed28f1%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6
> > 37215285907421019&amp;sdata=yBc0%2FrNnnWgRBiJcAvav4JtvmoG0Tyhd6p
> > X6gfFeW%2FU%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux