[PATCH 60/66] drm/amdgpu: set CHIP_IP_DISCOVERY as the asic type by default

Alex Deucher alexdeucher at gmail.com
Thu Sep 23 21:46:16 UTC 2021


On Thu, Sep 23, 2021 at 2:47 AM Lazar, Lijo <lijo.lazar at amd.com> wrote:
>
>
>
> On 9/21/2021 11:37 PM, Alex Deucher wrote:
> > For new chips with no explicit entry in the PCI ID list.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > index c21eac6216a8..c7da1f7cc880 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> > @@ -1796,12 +1796,12 @@ static const struct pci_device_id pciidlist[] = {
> >       { PCI_DEVICE(0x1002, PCI_ANY_ID),
> >         .class = PCI_CLASS_DISPLAY_VGA << 8,
> >         .class_mask = 0xffffff,
> > -       .driver_data = 0 },
> > +       .driver_data = CHIP_IP_DISCOVERY },
> >
> >       { PCI_DEVICE(0x1002, PCI_ANY_ID),
> >         .class = PCI_CLASS_DISPLAY_OTHER << 8,
> >         .class_mask = 0xffffff,
> > -       .driver_data = 0 },
> > +       .driver_data = CHIP_IP_DISCOVERY },
> >
>
> While listing the devices one by one, some of the below flags are also
> used to indicate the device type/support. Since the patch is replacing
> this method, I guess the series needs to address this one also
> (especially AMD_IS_APU, it is used extensively).
>
> enum amd_chip_flags {
>          AMD_ASIC_MASK = 0x0000ffffUL,
>          AMD_FLAGS_MASK  = 0xffff0000UL,
>          AMD_IS_MOBILITY = 0x00010000UL,
>          AMD_IS_APU      = 0x00020000UL,
>          AMD_IS_PX       = 0x00040000UL,
>          AMD_EXP_HW_SUPPORT = 0x00080000UL,
> };

I think we could either deprecate the use of these or derive them from
the IP versions for the flags that are currently derived from DIDs.
E.g., if we introduce support for a new IP (say SDMA 7.1) and it's not
stable yet, we could add code to set the AMD_EXP_HW_SUPPORT flag if
that IP version is found.

Alex


>
> Thanks,
> Lijo
>
>
> >       {0, 0, 0}
> >   };
> >


More information about the amd-gfx mailing list