* [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
@ 2021-11-03 14:52 Alex Deucher
2021-11-03 17:47 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2021-11-03 14:52 UTC (permalink / raw)
To: stable; +Cc: Yifan Zhang, youling, James Zhu, Alex Deucher
From: Yifan Zhang <yifan1.zhang@amd.com>
When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2
init will fail. But this failure should not block amdgpu driver init.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214859
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1770
Reported-by: youling <youling257@gmail.com>
Tested-by: youling <youling257@gmail.com>
Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit afd18180c07026f94a80ff024acef5f4159084a4)
Cc: stable@vger.kernel.org # 5.14.x
---
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 cd8cc7d31b49..b0824d2f0e0b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2380,10 +2380,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 5ba8a4f35344..ef64fb8f1bbf 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -875,6 +875,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.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
2021-11-03 14:52 [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso Alex Deucher
@ 2021-11-03 17:47 ` Greg KH
2021-11-03 17:52 ` Deucher, Alexander
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-11-03 17:47 UTC (permalink / raw)
To: Alex Deucher; +Cc: stable, Yifan Zhang, youling, James Zhu
On Wed, Nov 03, 2021 at 10:52:56AM -0400, Alex Deucher wrote:
> From: Yifan Zhang <yifan1.zhang@amd.com>
>
> When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2
> init will fail. But this failure should not block amdgpu driver init.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214859
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1770
> Reported-by: youling <youling257@gmail.com>
> Tested-by: youling <youling257@gmail.com>
> Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
> Reviewed-by: James Zhu <James.Zhu@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> (cherry picked from commit afd18180c07026f94a80ff024acef5f4159084a4)
> Cc: stable@vger.kernel.org # 5.14.x
> ---
> 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(-)
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
2021-11-03 17:47 ` Greg KH
@ 2021-11-03 17:52 ` Deucher, Alexander
2021-11-03 18:06 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Deucher, Alexander @ 2021-11-03 17:52 UTC (permalink / raw)
To: Greg KH; +Cc: stable@vger.kernel.org, Zhang, Yifan, youling, Zhu, James
[Public]
> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Wednesday, November 3, 2021 1:47 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: stable@vger.kernel.org; Zhang, Yifan <Yifan1.Zhang@amd.com>; youling
> <youling257@gmail.com>; Zhu, James <James.Zhu@amd.com>
> Subject: Re: [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in
> Picasso.
>
> On Wed, Nov 03, 2021 at 10:52:56AM -0400, Alex Deucher wrote:
> > From: Yifan Zhang <yifan1.zhang@amd.com>
> >
> > When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2 init
> > will fail. But this failure should not block amdgpu driver init.
> >
> > Bug:
> >
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> >
> illa.kernel.org%2Fshow_bug.cgi%3Fid%3D214859&data=04%7C01%7Cal
> exan
> >
> der.deucher%40amd.com%7C995f91a70fdd40d87e4908d99ef1ffb9%7C3dd89
> 61fe48
> >
> 84e608e11a82d994e183d%7C0%7C0%7C637715584500181786%7CUnknown%
> 7CTWFpbGZ
> >
> sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M
> n0%3
> >
> D%7C1000&sdata=J9BXIQq57fr%2BfvFHNkrPYps0M7JaFzq4mTh3dMNsk
> Xw%3D&am
> > p;reserved=0
> > Bug:
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
> > ab.freedesktop.org%2Fdrm%2Famd%2F-
> %2Fissues%2F1770&data=04%7C01%7C
> >
> alexander.deucher%40amd.com%7C995f91a70fdd40d87e4908d99ef1ffb9%7
> C3dd89
> >
> 61fe4884e608e11a82d994e183d%7C0%7C0%7C637715584500181786%7CUnkn
> own%7CT
> >
> WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC
> JXVCI
> >
> 6Mn0%3D%7C1000&sdata=OTO7kY60xizpZ0uHUn56OcZG0OzzUoytRnv
> QJfFCABg%3
> > D&reserved=0
> > Reported-by: youling <youling257@gmail.com>
> > Tested-by: youling <youling257@gmail.com>
> > Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
> > Reviewed-by: James Zhu <James.Zhu@amd.com>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry
> picked
> > from commit afd18180c07026f94a80ff024acef5f4159084a4)
> > Cc: stable@vger.kernel.org # 5.14.x
> > ---
> > 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(-)
>
> Now queued up, thanks.
Thanks. This should go to 5.15.x as well. I'm not sure if 5.15.x stable is open yet.
Alex
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
2021-11-03 17:52 ` Deucher, Alexander
@ 2021-11-03 18:06 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-11-03 18:06 UTC (permalink / raw)
To: Deucher, Alexander
Cc: stable@vger.kernel.org, Zhang, Yifan, youling, Zhu, James
On Wed, Nov 03, 2021 at 05:52:37PM +0000, Deucher, Alexander wrote:
> [Public]
>
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Wednesday, November 3, 2021 1:47 PM
> > To: Deucher, Alexander <Alexander.Deucher@amd.com>
> > Cc: stable@vger.kernel.org; Zhang, Yifan <Yifan1.Zhang@amd.com>; youling
> > <youling257@gmail.com>; Zhu, James <James.Zhu@amd.com>
> > Subject: Re: [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in
> > Picasso.
> >
> > On Wed, Nov 03, 2021 at 10:52:56AM -0400, Alex Deucher wrote:
> > > From: Yifan Zhang <yifan1.zhang@amd.com>
> > >
> > > When IOMMU disabled in sbios and kfd in iommuv2 path, iommuv2 init
> > > will fail. But this failure should not block amdgpu driver init.
> > >
> > > Bug:
> > >
> > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> > >
> > illa.kernel.org%2Fshow_bug.cgi%3Fid%3D214859&data=04%7C01%7Cal
> > exan
> > >
> > der.deucher%40amd.com%7C995f91a70fdd40d87e4908d99ef1ffb9%7C3dd89
> > 61fe48
> > >
> > 84e608e11a82d994e183d%7C0%7C0%7C637715584500181786%7CUnknown%
> > 7CTWFpbGZ
> > >
> > sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M
> > n0%3
> > >
> > D%7C1000&sdata=J9BXIQq57fr%2BfvFHNkrPYps0M7JaFzq4mTh3dMNsk
> > Xw%3D&am
> > > p;reserved=0
> > > Bug:
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitl
> > > ab.freedesktop.org%2Fdrm%2Famd%2F-
> > %2Fissues%2F1770&data=04%7C01%7C
> > >
> > alexander.deucher%40amd.com%7C995f91a70fdd40d87e4908d99ef1ffb9%7
> > C3dd89
> > >
> > 61fe4884e608e11a82d994e183d%7C0%7C0%7C637715584500181786%7CUnkn
> > own%7CT
> > >
> > WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLC
> > JXVCI
> > >
> > 6Mn0%3D%7C1000&sdata=OTO7kY60xizpZ0uHUn56OcZG0OzzUoytRnv
> > QJfFCABg%3
> > > D&reserved=0
> > > Reported-by: youling <youling257@gmail.com>
> > > Tested-by: youling <youling257@gmail.com>
> > > Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
> > > Reviewed-by: James Zhu <James.Zhu@amd.com>
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry
> > picked
> > > from commit afd18180c07026f94a80ff024acef5f4159084a4)
> > > Cc: stable@vger.kernel.org # 5.14.x
> > > ---
> > > 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(-)
> >
> > Now queued up, thanks.
>
> Thanks. This should go to 5.15.x as well. I'm not sure if 5.15.x stable is open yet.
It already got added there as well :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-03 18:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-03 14:52 [PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso Alex Deucher
2021-11-03 17:47 ` Greg KH
2021-11-03 17:52 ` Deucher, Alexander
2021-11-03 18:06 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox