[AMD Official Use Only - General]

Hi Bjorn,

Can we merge the below change through amdgpu tree ?  Thanks!

--Brs,
Morris Zhang
MLSE Linux  ML SRDC
Ext. 25147

> -----Original Message-----
> From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Shiwu
> Zhang
> Sent: Tuesday, May 23, 2023 12:03 PM
> To: amd-gfx@lists.freedesktop.org; linux-...@vger.kernel.org;
> bhelg...@google.com
> Subject: [PATCH] drm/amdgpu: add the accelerator pcie class
>
> v2: add the base class id for accelerator (lijo)
>
> Signed-off-by: Shiwu Zhang <shiwu.zh...@amd.com>
> Acked-by: Lijo Lazar <lijo.la...@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

Reply via email to