* [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code
@ 2021-09-24 5:48 Yifan Zhang
2021-09-24 5:48 ` [PATCH 2/2] drm/amdkfd: configure iommu when kfd init Yifan Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Yifan Zhang @ 2021-09-24 5:48 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, Yifan Zhang
kfd_resume doesn't involve iommu operation, remove
redundant iommu cleanup code.
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index c2a4d920da40..4a416231b24c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -1085,18 +1085,12 @@ static int kfd_resume(struct kfd_dev *kfd)
int err = 0;
err = kfd->dqm->ops.start(kfd->dqm);
- if (err) {
+ if (err)
dev_err(kfd_device,
"Error starting queue manager for device %x:%x\n",
kfd->pdev->vendor, kfd->pdev->device);
- goto dqm_start_error;
- }
return err;
-
-dqm_start_error:
- kfd_iommu_suspend(kfd);
- return err;
}
static inline void kfd_queue_work(struct workqueue_struct *wq,
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] drm/amdkfd: configure iommu when kfd init
2021-09-24 5:48 [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code Yifan Zhang
@ 2021-09-24 5:48 ` Yifan Zhang
0 siblings, 0 replies; 2+ messages in thread
From: Yifan Zhang @ 2021-09-24 5:48 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, Yifan Zhang
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@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-24 5:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 5:48 [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code Yifan Zhang
2021-09-24 5:48 ` [PATCH 2/2] drm/amdkfd: configure iommu when kfd init Yifan Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.