* [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
@ 2021-10-13 6:16 Yifan Zhang
2021-10-13 6:16 ` [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu " Yifan Zhang
2021-10-13 12:49 ` [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is " James Zhu
0 siblings, 2 replies; 4+ messages in thread
From: Yifan Zhang @ 2021-10-13 6:16 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, James.Zhu, youling257, Yifan Zhang
When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2
init will fail. But this failure should not block amdgpu driver init.
Reported-by: youling <youling257@gmail.com>
Tested-by: youling <youling257@gmail.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 +++
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 52b24334a19e..ef467216ff8a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2397,10 +2397,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
if (!adev->gmc.xgmi.pending_reset)
amdgpu_amdkfd_device_init(adev);
- r = amdgpu_amdkfd_resume_iommu(adev);
- if (r)
- goto init_failed;
-
amdgpu_fru_get_product_info(adev);
init_failed:
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 064d42acd54e..08eedbc6699d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -1029,6 +1029,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
svm_migrate_init((struct amdgpu_device *)kfd->kgd);
+ if(kgd2kfd_resume_iommu(kfd))
+ goto device_iommu_error;
+
if (kfd_resume(kfd))
goto kfd_resume_error;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu disabled in Picasso
2021-10-13 6:16 [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso Yifan Zhang
@ 2021-10-13 6:16 ` Yifan Zhang
2021-10-29 15:44 ` youling 257
2021-10-13 12:49 ` [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is " James Zhu
1 sibling, 1 reply; 4+ messages in thread
From: Yifan Zhang @ 2021-10-13 6:16 UTC (permalink / raw)
To: amd-gfx; +Cc: Felix.Kuehling, James.Zhu, youling257, Yifan Zhang
When IOMMU disabled in sbios and kfd in iommuv2 path,
IOMMU resume failure blocks system resume. Don't allow kfd to
use iommu v2 when iommu is disabled.
Reported-by: youling <youling257@gmail.com>
Tested-by: youling <youling257@gmail.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 08eedbc6699d..99d2b9c875ea 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -1021,6 +1021,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
kfd_double_confirm_iommu_support(kfd);
if (kfd_iommu_device_init(kfd)) {
+ kfd->use_iommu_v2 = false;
dev_err(kfd_device, "Error initializing iommuv2\n");
goto device_iommu_error;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
2021-10-13 6:16 [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso Yifan Zhang
2021-10-13 6:16 ` [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu " Yifan Zhang
@ 2021-10-13 12:49 ` James Zhu
1 sibling, 0 replies; 4+ messages in thread
From: James Zhu @ 2021-10-13 12:49 UTC (permalink / raw)
To: Yifan Zhang, amd-gfx; +Cc: Felix.Kuehling, James.Zhu, youling257
[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]
Reviewed-by:JamesZhu<James.Zhu@amd.com>fortheseries.
> When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2
> init will fail. But this failure should not block amdgpu driver init.
>
> Reported-by: youling<youling257@gmail.com>
> Tested-by: youling<youling257@gmail.com>
> Signed-off-by: Yifan Zhang<yifan1.zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ----
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 +++
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 52b24334a19e..ef467216ff8a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2397,10 +2397,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
> if (!adev->gmc.xgmi.pending_reset)
> amdgpu_amdkfd_device_init(adev);
>
> - r = amdgpu_amdkfd_resume_iommu(adev);
> - if (r)
> - goto init_failed;
> -
> amdgpu_fru_get_product_info(adev);
>
> init_failed:
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 064d42acd54e..08eedbc6699d 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -1029,6 +1029,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
>
> svm_migrate_init((struct amdgpu_device *)kfd->kgd);
>
> + if(kgd2kfd_resume_iommu(kfd))
> + goto device_iommu_error;
> +
> if (kfd_resume(kfd))
> goto kfd_resume_error;
>
[-- Attachment #2: Type: text/html, Size: 2603 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu disabled in Picasso
2021-10-13 6:16 ` [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu " Yifan Zhang
@ 2021-10-29 15:44 ` youling 257
0 siblings, 0 replies; 4+ messages in thread
From: youling 257 @ 2021-10-29 15:44 UTC (permalink / raw)
To: Yifan Zhang; +Cc: amd-gfx, Felix.Kuehling, James.Zhu
will it merge into linux 5.15 release?
2021-10-13 14:16 GMT+08:00, Yifan Zhang <yifan1.zhang@amd.com>:
> When IOMMU disabled in sbios and kfd in iommuv2 path,
> IOMMU resume failure blocks system resume. Don't allow kfd to
> use iommu v2 when iommu is disabled.
>
> Reported-by: youling <youling257@gmail.com>
> Tested-by: youling <youling257@gmail.com>
> Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> index 08eedbc6699d..99d2b9c875ea 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
> @@ -1021,6 +1021,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
> kfd_double_confirm_iommu_support(kfd);
>
> if (kfd_iommu_device_init(kfd)) {
> + kfd->use_iommu_v2 = false;
> dev_err(kfd_device, "Error initializing iommuv2\n");
> goto device_iommu_error;
> }
> --
> 2.25.1
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-29 15:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 6:16 [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso Yifan Zhang
2021-10-13 6:16 ` [PATCH v2 2/2] drm/amdkfd: fix resume error when iommu " Yifan Zhang
2021-10-29 15:44 ` youling 257
2021-10-13 12:49 ` [PATCH v2 1/2] drm/amdkfd: fix boot failure when iommu is " James Zhu
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.