Commit b5d1d755 authored by Graham Sider's avatar Graham Sider Committed by Alex Deucher

drm/amdkfd: remove kgd_dev declaration and initialization

Completes removal of kgd_dev. Direct references to amdgpu_device objects
should now be used instead.
Signed-off-by: default avatarGraham Sider <Graham.Sider@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 56c5977e
...@@ -72,7 +72,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev) ...@@ -72,7 +72,7 @@ void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
if (!kfd_initialized) if (!kfd_initialized)
return; return;
adev->kfd.dev = kgd2kfd_probe((struct kgd_dev *)adev, vf); adev->kfd.dev = kgd2kfd_probe(adev, vf);
if (adev->kfd.dev) if (adev->kfd.dev)
amdgpu_amdkfd_total_mem_size += adev->gmc.real_vram_size; amdgpu_amdkfd_total_mem_size += adev->gmc.real_vram_size;
......
...@@ -334,7 +334,7 @@ int kgd2kfd_schedule_evict_and_restore_process(struct mm_struct *mm, ...@@ -334,7 +334,7 @@ int kgd2kfd_schedule_evict_and_restore_process(struct mm_struct *mm,
#if IS_ENABLED(CONFIG_HSA_AMD) #if IS_ENABLED(CONFIG_HSA_AMD)
int kgd2kfd_init(void); int kgd2kfd_init(void);
void kgd2kfd_exit(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, bool kgd2kfd_device_init(struct kfd_dev *kfd,
struct drm_device *ddev, struct drm_device *ddev,
const struct kgd2kfd_shared_resources *gpu_resources); const struct kgd2kfd_shared_resources *gpu_resources);
...@@ -358,7 +358,7 @@ static inline void kgd2kfd_exit(void) ...@@ -358,7 +358,7 @@ static inline void kgd2kfd_exit(void)
} }
static inline 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; return NULL;
} }
......
...@@ -627,12 +627,11 @@ static void kfd_gtt_sa_fini(struct kfd_dev *kfd); ...@@ -627,12 +627,11 @@ static void kfd_gtt_sa_fini(struct kfd_dev *kfd);
static int kfd_resume(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; struct kfd_dev *kfd;
const struct kfd_device_info *device_info; const struct kfd_device_info *device_info;
const struct kfd2kgd_calls *f2g; const struct kfd2kgd_calls *f2g;
struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
struct pci_dev *pdev = adev->pdev; struct pci_dev *pdev = adev->pdev;
switch (adev->asic_type) { switch (adev->asic_type) {
...@@ -824,7 +823,6 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf) ...@@ -824,7 +823,6 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, bool vf)
if (!kfd) if (!kfd)
return NULL; return NULL;
kfd->kgd = kgd;
kfd->adev = adev; kfd->adev = adev;
kfd->device_info = device_info; kfd->device_info = device_info;
kfd->pdev = pdev; kfd->pdev = pdev;
......
...@@ -228,7 +228,6 @@ struct kfd_vmid_info { ...@@ -228,7 +228,6 @@ struct kfd_vmid_info {
}; };
struct kfd_dev { struct kfd_dev {
struct kgd_dev *kgd;
struct amdgpu_device *adev; struct amdgpu_device *adev;
const struct kfd_device_info *device_info; const struct kfd_device_info *device_info;
......
...@@ -38,8 +38,6 @@ struct amdgpu_device; ...@@ -38,8 +38,6 @@ struct amdgpu_device;
#define KGD_MAX_QUEUES 128 #define KGD_MAX_QUEUES 128
struct kfd_dev; struct kfd_dev;
struct kgd_dev;
struct kgd_mem; struct kgd_mem;
enum kfd_preempt_type { enum kfd_preempt_type {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment