All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: add the accelerator pcie class
@ 2023-05-23  4:02 Shiwu Zhang
  2023-05-23  4:12 ` Zhang, Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Shiwu Zhang @ 2023-05-23  4:02 UTC (permalink / raw)
  To: amd-gfx, linux-pci, bhelgaas

v2: add the base class id for accelerator (lijo)

Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Acked-by: Lijo Lazar <lijo.lazar@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++
 include/linux/pci_ids.h                 | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 3d91e123f9bd..5d652e6f0b1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2042,6 +2042,11 @@ static const struct pci_device_id pciidlist[] = {
 	  .class_mask = 0xffffff,
 	  .driver_data = CHIP_IP_DISCOVERY },
 
+	{ PCI_DEVICE(0x1002, PCI_ANY_ID),
+	  .class = PCI_CLASS_ACCELERATOR_PROCESSING << 8,
+	  .class_mask = 0xffffff,
+	  .driver_data = CHIP_IP_DISCOVERY },
+
 	{0, 0, 0}
 };
 
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index b362d90eb9b0..4918ff26a987 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -151,6 +151,9 @@
 #define PCI_CLASS_SP_DPIO		0x1100
 #define PCI_CLASS_SP_OTHER		0x1180
 
+#define PCI_BASE_CLASS_ACCELERATOR	0x12
+#define PCI_CLASS_ACCELERATOR_PROCESSING	0x1200
+
 #define PCI_CLASS_OTHERS		0xff
 
 /* Vendors and devices.  Sort key: vendor first, device next. */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-06-08 19:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.