From: Shiwu Zhang <shiwu.zhang@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <linux-pci@vger.kernel.org>,
<bhelgaas@google.com>
Subject: [PATCH] drm/amdgpu: add the accelerator pcie class
Date: Tue, 23 May 2023 12:02:32 +0800 [thread overview]
Message-ID: <20230523040232.21756-1-shiwu.zhang@amd.com> (raw)
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
next reply other threads:[~2023-05-23 4:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 4:02 Shiwu Zhang [this message]
2023-05-23 4:12 ` [PATCH] drm/amdgpu: add the accelerator pcie class 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
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=20230523040232.21756-1-shiwu.zhang@amd.com \
--to=shiwu.zhang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
/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: link
Be 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.