[PATCH 2/2] drm/amdkfd: configure iommu when kfd init
Yifan Zhang
yifan1.zhang at amd.com
Fri Sep 24 05:48:59 UTC 2021
fix clinfo failure in Raven/Picasso:
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.2 AMD-APP (3364.0)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback
Platform Name: AMD Accelerated Parallel Processing
Number of devices: 0
Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 4a416231b24c..16bd64852b61 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -924,6 +924,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
svm_migrate_init((struct amdgpu_device *)kfd->kgd);
+ if (kgd2kfd_resume_iommu(kfd))
+ goto kfd_iommu_resume_error;
+
if (kfd_resume(kfd))
goto kfd_resume_error;
@@ -947,6 +950,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
kfd_topology_add_device_error:
kfd_resume_error:
+ kfd_iommu_suspend(kfd);
+kfd_iommu_resume_error:
device_iommu_error:
gws_error:
device_queue_manager_uninit(kfd->dqm);
--
2.25.1
More information about the amd-gfx
mailing list