drm/amdkfd: add amdgpu_device entry to kfd_dev
authorGraham Sider <Graham.Sider@amd.com>
Tue, 12 Oct 2021 16:16:15 +0000 (12:16 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Nov 2021 21:57:59 +0000 (16:57 -0500)
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@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/include/kgd_kfd_interface.h

index 3b119db16003ed9b3c7afdf48ae32d69f9b691fd..a3426dac0306cd8373d95a9e6ebd76c73e1889a7 100644 (file)
@@ -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;
index 94e92c0812db733535244a2d18133baf280903f2..ac4f7841366cc574ef93da997325b5bae3c05b68 100644 (file)
@@ -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;
index c84bd7b2cf59ff1bdbe6e09ac7d889a67cf538ab..ba444cbf920625e0b540e2fbf8f1cd1b38ac615e 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/dma-fence.h>
 
 struct pci_dev;
+struct amdgpu_device;
 
 #define KGD_MAX_QUEUES 128