]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdkfd: remove kgd_dev declaration and initialization
authorGraham Sider <Graham.Sider@amd.com>
Tue, 19 Oct 2021 17:28:45 +0000 (13:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 17 Nov 2021 21:58:03 +0000 (16:58 -0500)
Completes removal of kgd_dev. Direct references to amdgpu_device objects
should now be used instead.

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/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
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 79a2e37baa59cf0a614ca48a0c7a5a0b1c1c32a9..83f863dca7afb52fa90d7329992751e103e9b60f 100644 (file)
@@ -72,7 +72,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
        if (!kfd_initialized)
                return;
 
-       adev->kfd.dev = kgd2kfd_probe((struct kgd_dev *)adev, vf);
+       adev->kfd.dev = kgd2kfd_probe(adev, vf);
 
        if (adev->kfd.dev)
                amdgpu_amdkfd_total_mem_size += adev->gmc.real_vram_size;
index 3e2bff568e138580a1eba05151d6ab4268460f8b..5f658823a637bc5b035b96801b15ec3e6f3ac698 100644 (file)
@@ -334,7 +334,7 @@ int kgd2kfd_schedule_evict_and_restore_process(struct mm_struct *mm,
 #if IS_ENABLED(CONFIG_HSA_AMD)
 int kgd2kfd_init(void);
 void kgd2kfd_exit(void);
-struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf);
+struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf);
 bool kgd2kfd_device_init(struct kfd_dev *kfd,
                         struct drm_device *ddev,
                         const struct kgd2kfd_shared_resources *gpu_resources);
@@ -358,7 +358,7 @@ static inline void kgd2kfd_exit(void)
 }
 
 static inline
-struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
+struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
 {
        return NULL;
 }
index eb125ad72f42ec84486e251e8cf3f6bb9be9f7eb..c8aade17efef8384a8906ab7409ae3224671cf27 100644 (file)
@@ -627,12 +627,11 @@ static void kfd_gtt_sa_fini(struct kfd_dev *kfd);
 
 static int kfd_resume(struct kfd_dev *kfd);
 
-struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
+struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
 {
        struct kfd_dev *kfd;
        const struct kfd_device_info *device_info;
        const struct kfd2kgd_calls *f2g;
-       struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
        struct pci_dev *pdev = adev->pdev;
 
        switch (adev->asic_type) {
@@ -824,7 +823,6 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
        if (!kfd)
                return NULL;
 
-       kfd->kgd = kgd;
        kfd->adev = adev;
        kfd->device_info = device_info;
        kfd->pdev = pdev;
index b35e20bf4803cb13e1e8c667ab58efe3a491612e..78ae96fc8a6ae4c1325ef3edfba595adb643bb1b 100644 (file)
@@ -228,7 +228,6 @@ struct kfd_vmid_info {
 };
 
 struct kfd_dev {
-       struct kgd_dev *kgd;
        struct amdgpu_device *adev;
 
        const struct kfd_device_info *device_info;
index 8f4f3a1700e8528193887c4b57893d103123f8f5..ac941f62cbed13dae4686b8779aa2da931b06b9f 100644 (file)
@@ -38,8 +38,6 @@ struct amdgpu_device;
 #define KGD_MAX_QUEUES 128
 
 struct kfd_dev;
-struct kgd_dev;
-
 struct kgd_mem;
 
 enum kfd_preempt_type {