[PATCH 01/13] drm/amdkfd: add amdgpu_device entry to kfd_dev
Felix Kuehling
felix.kuehling at amd.com
Tue Oct 26 21:30:48 UTC 2021
Am 2021-10-19 um 5:13 p.m. schrieb Graham Sider:
> Patch series to remove kgd_dev struct and replace all instances with
> amdgpu_device objects.
>
> amdgpu_device needs to be declared in kgd_kfd_interface.h to be visible
> to kfd2kgd_calls.
>
> Signed-off-by: Graham Sider <Graham.Sider at amd.com>
Nice cleanup. I responded with a suggestion for a possible follow-up to
patch 10. The series is
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 +
> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 +
> drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 0fffaf859c59..81ca00d7b3da 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -825,6 +825,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
> return NULL;
>
> kfd->kgd = kgd;
> + kfd->adev = adev;
> kfd->device_info = device_info;
> kfd->pdev = pdev;
> kfd->init_complete = false;
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index 6d8f9bb2d905..c8bd062fb954 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -229,6 +229,7 @@ struct kfd_vmid_info {
>
> struct kfd_dev {
> struct kgd_dev *kgd;
> + struct amdgpu_device *adev;
>
> const struct kfd_device_info *device_info;
> struct pci_dev *pdev;
> diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> index c84bd7b2cf59..ba444cbf9206 100644
> --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h
> @@ -33,6 +33,7 @@
> #include <linux/dma-fence.h>
>
> struct pci_dev;
> +struct amdgpu_device;
>
> #define KGD_MAX_QUEUES 128
>
More information about the amd-gfx
mailing list