* [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; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
* Re: [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code
2021-09-28 8:28 [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code Yifan Zhang
@ 2021-09-30 21:18 ` Zhu, James
0 siblings, 0 replies; 4+ messages in thread
From: Zhu, James @ 2021-09-30 21:18 UTC (permalink / raw)
To: Zhang, Yifan, amd-gfx; +Cc: Kuehling, Felix
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
[AMD Official Use Only]
Reviewed-by: James Zhu <James.Zhu@amd.com> for the series
James Zhu
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Yifan Zhang <yifan1.zhang@amd.com>
Sent: Tuesday, September 28, 2021 4:28 AM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Kuehling, Felix <Felix.Kuehling@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>
Subject: [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code
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
[-- Attachment #2: Type: text/html, Size: 4097 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code
@ 2021-09-28 8:28 Yifan Zhang
2021-09-30 21:18 ` Zhu, James
0 siblings, 1 reply; 4+ messages in thread
From: Yifan Zhang @ 2021-09-28 8:28 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] 4+ messages in thread
end of thread, other threads:[~2021-09-30 21:18 UTC | newest]
Thread overview: 4+ 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
2021-09-28 8:28 [PATCH 1/2] drm/amdkfd: remove redundant iommu cleanup code Yifan Zhang
2021-09-30 21:18 ` Zhu, James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).