[PATCH] drm/amdgpu: add the accelerator pcie class

Alex Deucher alexdeucher at gmail.com
Tue May 23 14:02:32 UTC 2023


On Tue, May 23, 2023 at 5:25 AM Christoph Hellwig <hch at infradead.org> wrote:
>
> On Tue, May 23, 2023 at 12:02:32PM +0800, Shiwu Zhang wrote:
> > +     { PCI_DEVICE(0x1002, PCI_ANY_ID),
> > +       .class = PCI_CLASS_ACCELERATOR_PROCESSING << 8,
> > +       .class_mask = 0xffffff,
> > +       .driver_data = CHIP_IP_DISCOVERY },
>
> Probing for every single device of a given class for a single vendor
> to a driver is just fundamentaly wrong.  Please list the actual IDs
> that the driver can handle.

How so?  The driver handles all devices of that class.  We already do
that for PCI_CLASS_DISPLAY_VGA and PCI_CLASS_DISPLAY_OTHER.  Other
drivers do similar things.  The hda audio driver does the same thing
for PCI_CLASS_MULTIMEDIA_HD_AUDIO for example.

Alex


More information about the amd-gfx mailing list