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

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

 



[AMD Official Use Only - General]

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Christoph Hellwig
> Sent: Thursday, May 25, 2023 5:47 AM
> To: Alex Deucher <alexdeucher@xxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>; bhelgaas@xxxxxxxxxx; amd-
> gfx@xxxxxxxxxxxxxxxxxxxxx; Zhang, Morris <Shiwu.Zhang@xxxxxxx>; linux-
> pci@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxx>
> 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




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

  Powered by Linux