Re: [PATCH 01/13] drm/amdkfd: add amdgpu_device entry to kfd_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

Nice cleanup. I responded with a suggestion for a possible follow-up to
patch 10. The series is

Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>


> ---
>  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
>  



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux