diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2021-08-12 15:06:24 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-10-04 15:23:02 -0400 |
commit | 5b983db8c3b841a137263070a1fb805e6058dedd (patch) | |
tree | 36e064be47e86fa48ee312b0758d279a6652ea32 /drivers/gpu/drm/amd/amdkfd/kfd_device.c | |
parent | drm/amdgpu: add support for SRIOV in IP discovery path (diff) | |
download | linux-dev-5b983db8c3b841a137263070a1fb805e6058dedd.tar.xz linux-dev-5b983db8c3b841a137263070a1fb805e6058dedd.zip |
drm/amdkfd: clean up parameters in kgd2kfd_probe
We can get the pdev and asic type from the adev. No need
to pass them explicitly.
v2: squash in build fix for !CONFIG_HSA_AMD from Anson
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index c2a4d920da40..82af344cbf10 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -32,6 +32,7 @@ #include "amdgpu_amdkfd.h" #include "kfd_smi_events.h" #include "kfd_migrate.h" +#include "amdgpu.h" #define MQD_SIZE_ALIGNED 768 @@ -691,12 +692,14 @@ 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, - struct pci_dev *pdev, unsigned int asic_type, bool vf) +struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, 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; + unsigned int asic_type = adev->asic_type; + struct pci_dev *pdev = adev->pdev; if (asic_type >= sizeof(kfd_supported_devices) / (sizeof(void *) * 2) || asic_type >= sizeof(kfd2kgd_funcs) / sizeof(void *)) { |