[PATCH] drm/amdgpu: Disable FRU EEPROM access for SRIOV

Russell, Kent Kent.Russell at amd.com
Thu Jan 20 17:58:56 UTC 2022


[AMD Official Use Only]

Reviewed-by: Kent Russell <kent.russell at amd.com>



> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
> Sent: Thursday, January 20, 2022 11:51 AM
> To: Liu, Shaoyun <Shaoyun.Liu at amd.com>
> Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>
> Subject: Re: [PATCH] drm/amdgpu: Disable FRU EEPROM access for SRIOV
>
> On Thu, Jan 20, 2022 at 10:49 AM shaoyunl <shaoyun.liu at amd.com> wrote:
> >
> > VF acces the EEPROM is blocked by security policy, we might need other way
> > to get SKUs info for VF
> >
> > Signed-off-by: shaoyunl <shaoyun.liu at amd.com>
>
> Acked-by: Alex Deucher <alexander.deucher at amd.com>
>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > index 2a786e788627..0548e279cc9f 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
> > @@ -40,6 +40,12 @@ static bool is_fru_eeprom_supported(struct amdgpu_device *adev)
> >          */
> >         struct atom_context *atom_ctx = adev->mode_info.atom_context;
> >
> > +       /* The i2c access is blocked on VF
> > +        * TODO: Need other way to get the info
> > +        */
> > +       if (amdgpu_sriov_vf(adev)
> > +               return false;
> > +
> >         /* VBIOS is of the format ###-DXXXYY-##. For SKU identification,
> >          * we can use just the "DXXX" portion. If there were more models, we
> >          * could convert the 3 characters to a hex integer and use a switch
> > --
> > 2.17.1
> >


More information about the amd-gfx mailing list