From: Christoph Hellwig <hch@infradead.org> To: Alex Deucher <alexdeucher@gmail.com> Cc: Christoph Hellwig <hch@infradead.org>, Shiwu Zhang <shiwu.zhang@amd.com>, bhelgaas@google.com, linux-pci@vger.kernel.org, amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: add the accelerator pcie class Date: Thu, 25 May 2023 02:46:31 -0700 [thread overview] Message-ID: <ZG8ud4JWpF7BXJ7c@infradead.org> (raw) In-Reply-To: <CADnq5_Pnob2+NPyf6GEcsCExC26qg_QvTri_CQLT=ArPibSxSA@mail.gmail.com> 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@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. > The hda audio driver does the same thing > for PCI_CLASS_MULTIMEDIA_HD_AUDIO for example. > That, just like PCI_CLASS_STORAGE_EXPRESS is a different case, as the class is associated with an actual documented programming interface.
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@infradead.org> To: Alex Deucher <alexdeucher@gmail.com> Cc: Christoph Hellwig <hch@infradead.org>, bhelgaas@google.com, amd-gfx@lists.freedesktop.org, Shiwu Zhang <shiwu.zhang@amd.com>, linux-pci@vger.kernel.org Subject: Re: [PATCH] drm/amdgpu: add the accelerator pcie class Date: Thu, 25 May 2023 02:46:31 -0700 [thread overview] Message-ID: <ZG8ud4JWpF7BXJ7c@infradead.org> (raw) In-Reply-To: <CADnq5_Pnob2+NPyf6GEcsCExC26qg_QvTri_CQLT=ArPibSxSA@mail.gmail.com> 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@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. > The hda audio driver does the same thing > for PCI_CLASS_MULTIMEDIA_HD_AUDIO for example. > That, just like PCI_CLASS_STORAGE_EXPRESS is a different case, as the class is associated with an actual documented programming interface.
next prev parent reply other threads:[~2023-05-25 9:46 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-23 4:02 [PATCH] drm/amdgpu: add the accelerator pcie class Shiwu Zhang 2023-05-23 4:12 ` Zhang, Morris 2023-05-23 6:37 ` Christoph Hellwig 2023-05-23 6:37 ` Christoph Hellwig 2023-05-23 14:02 ` Alex Deucher 2023-05-23 14:02 ` Alex Deucher 2023-05-25 9:46 ` Christoph Hellwig [this message] 2023-05-25 9:46 ` Christoph Hellwig 2023-05-25 20:52 ` Deucher, Alexander 2023-05-25 20:52 ` Deucher, Alexander 2023-05-26 6:55 ` Christoph Hellwig 2023-05-26 6:55 ` Christoph Hellwig 2023-05-30 18:22 ` Deucher, Alexander 2023-05-30 18:22 ` Deucher, Alexander 2023-06-08 19:52 ` Bjorn Helgaas 2023-06-08 19:52 ` Bjorn Helgaas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=ZG8ud4JWpF7BXJ7c@infradead.org \ --to=hch@infradead.org \ --cc=alexdeucher@gmail.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=bhelgaas@google.com \ --cc=linux-pci@vger.kernel.org \ --cc=shiwu.zhang@amd.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.