[PATCH] drm/amdgpu: add the accelerator pcie class
Deucher, Alexander
Alexander.Deucher at amd.com
Thu May 25 20:52:06 UTC 2023
[AMD Official Use Only - General]
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Christoph Hellwig
> Sent: Thursday, May 25, 2023 5:47 AM
> To: Alex Deucher <alexdeucher at gmail.com>
> Cc: Christoph Hellwig <hch at infradead.org>; bhelgaas at google.com; amd-
> gfx at lists.freedesktop.org; Zhang, Morris <Shiwu.Zhang at amd.com>; linux-
> pci at vger.kernel.org
> Subject: Re: [PATCH] drm/amdgpu: add the accelerator pcie class
>
> On Tue, May 23, 2023 at 10:02:32AM -0400, Alex Deucher wrote:
> > 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.
>
> How is that going to work in the long run? The chances of totally
> incompatbile devices from the same vendor appearing is absolutely given.
>
We already handle this today for CLASS_DISPLAY via a data table provided on our hardware that details the components on the board. The driver can then determine whether or not that combination of components is supported. If the data table doesn't exist or isn’t parse-able, or the components enumerated are not supported, the driver doesn't load.
Alex
More information about the amd-gfx
mailing list