* [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." @ 2021-11-02 19:23 James Zhu 2021-11-02 19:23 ` [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu 2021-11-02 20:34 ` [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." Alex Deucher 0 siblings, 2 replies; 8+ messages in thread From: James Zhu @ 2021-11-02 19:23 UTC (permalink / raw) To: amd-gfx; +Cc: alexander.deucher, yifan1.zhang, jamesz, zarniwhoop To revert wrong merge during rebase. This reverts commit afd18180c07026f94a80ff024acef5f4159084a4. --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index 7677ced16a27..be26c4016ade 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -1031,9 +1031,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, svm_migrate_init(kfd->adev); - 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] 8+ messages in thread
* [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso. 2021-11-02 19:23 [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." James Zhu @ 2021-11-02 19:23 ` James Zhu 2021-11-03 3:53 ` Lazar, Lijo 2021-11-02 20:34 ` [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." Alex Deucher 1 sibling, 1 reply; 8+ messages in thread From: James Zhu @ 2021-11-02 19:23 UTC (permalink / raw) To: amd-gfx; +Cc: alexander.deucher, yifan1.zhang, youling, jamesz, zarniwhoop 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. 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> --- 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 e56bc925afcf..f77823ce7ae8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2398,10 +2398,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 be26c4016ade..7677ced16a27 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -1031,6 +1031,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, svm_migrate_init(kfd->adev); + 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] 8+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso. 2021-11-02 19:23 ` [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu @ 2021-11-03 3:53 ` Lazar, Lijo 2021-11-03 16:27 ` James Zhu 0 siblings, 1 reply; 8+ messages in thread From: Lazar, Lijo @ 2021-11-03 3:53 UTC (permalink / raw) To: James Zhu, amd-gfx Cc: alexander.deucher, yifan1.zhang, youling, jamesz, zarniwhoop On 11/3/2021 12:53 AM, James Zhu 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. > > 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> > --- > 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 e56bc925afcf..f77823ce7ae8 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -2398,10 +2398,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 be26c4016ade..7677ced16a27 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > @@ -1031,6 +1031,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, > > svm_migrate_init(kfd->adev); > > + if(kgd2kfd_resume_iommu(kfd)) > + goto device_iommu_error; > + This also brings a duplicate iommu resume in the reset path - https://elixir.bootlin.com/linux/v5.15/source/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c#L4612 Thanks, Lijo > if (kfd_resume(kfd)) > goto kfd_resume_error; > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso. 2021-11-03 3:53 ` Lazar, Lijo @ 2021-11-03 16:27 ` James Zhu 2021-11-03 16:44 ` Lazar, Lijo 0 siblings, 1 reply; 8+ messages in thread From: James Zhu @ 2021-11-03 16:27 UTC (permalink / raw) To: Lazar, Lijo, James Zhu, amd-gfx Cc: alexander.deucher, yifan1.zhang, youling, zarniwhoop On 2021-11-02 11:53 p.m., Lazar, Lijo wrote: > > > On 11/3/2021 12:53 AM, James Zhu 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. >> >> 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> >> --- >> 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 e56bc925afcf..f77823ce7ae8 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c >> @@ -2398,10 +2398,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 be26c4016ade..7677ced16a27 100644 >> --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c >> @@ -1031,6 +1031,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, >> svm_migrate_init(kfd->adev); >> + if(kgd2kfd_resume_iommu(kfd)) >> + goto device_iommu_error; >> + > > This also brings a duplicate iommu resume in the reset path - > https://elixir.bootlin.com/linux/v5.15/source/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c#L4612 > [JZ] Hi Lijo, please help clarify this duplicate case. Thanks! James > > Thanks, > Lijo >> if (kfd_resume(kfd)) >> goto kfd_resume_error; >> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso. 2021-11-03 16:27 ` James Zhu @ 2021-11-03 16:44 ` Lazar, Lijo 0 siblings, 0 replies; 8+ messages in thread From: Lazar, Lijo @ 2021-11-03 16:44 UTC (permalink / raw) To: Zhu, James, amd-gfx; +Cc: Deucher, Alexander, Zhang, Yifan, youling, zarniwhoop [-- Attachment #1: Type: text/plain, Size: 263 bytes --] [Public] It's a conditional case for some kind of early reset. Haven't checked details, on a quick glance it appeared to call iommu init again. https://elixir.bootlin.com/linux/v5.15/source/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c#L5160 Thanks, Lijo [-- Attachment #2: Type: text/html, Size: 971 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." 2021-11-02 19:23 [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." James Zhu 2021-11-02 19:23 ` [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu @ 2021-11-02 20:34 ` Alex Deucher 2021-11-02 21:00 ` Zhu, James 1 sibling, 1 reply; 8+ messages in thread From: Alex Deucher @ 2021-11-02 20:34 UTC (permalink / raw) To: James Zhu Cc: Deucher, Alexander, Yifan Zhang, James Zhu, amd-gfx list, Ken Moffat On Tue, Nov 2, 2021 at 3:23 PM James Zhu <James.Zhu@amd.com> wrote: > > To revert wrong merge during rebase. > This reverts commit afd18180c07026f94a80ff024acef5f4159084a4. Missing your signed-off-by. Might be better to just merge these two patches into one unless they are individually applicable to different kernels (e.g., 5.15 vs drm-next). Also these will probably fix the following: Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214859 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1770 Alex > --- > drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > index 7677ced16a27..be26c4016ade 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > @@ -1031,9 +1031,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, > > svm_migrate_init(kfd->adev); > > - if(kgd2kfd_resume_iommu(kfd)) > - goto device_iommu_error; > - > if (kfd_resume(kfd)) > goto kfd_resume_error; > > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." 2021-11-02 20:34 ` [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." Alex Deucher @ 2021-11-02 21:00 ` Zhu, James 2021-11-02 21:41 ` Ken Moffat 0 siblings, 1 reply; 8+ messages in thread From: Zhu, James @ 2021-11-02 21:00 UTC (permalink / raw) To: Alex Deucher; +Cc: Deucher, Alexander, Zhang, Yifan, amd-gfx list, Ken Moffat [-- Attachment #1: Type: text/plain, Size: 2515 bytes --] [AMD Official Use Only] Hi Alex Sure, Let me check it can be merged into one patch. Thanks & Best Regards! James Zhu ________________________________ From: Alex Deucher <alexdeucher@gmail.com> Sent: Tuesday, November 2, 2021 4:34 PM To: Zhu, James <James.Zhu@amd.com> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Zhu, James <James.Zhu@amd.com>; Ken Moffat <zarniwhoop@ntlworld.com> Subject: Re: [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." On Tue, Nov 2, 2021 at 3:23 PM James Zhu <James.Zhu@amd.com> wrote: > > To revert wrong merge during rebase. > This reverts commit afd18180c07026f94a80ff024acef5f4159084a4. Missing your signed-off-by. Might be better to just merge these two patches into one unless they are individually applicable to different kernels (e.g., 5.15 vs drm-next). Also these will probably fix the following: Bug: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D214859&data=04%7C01%7CJames.Zhu%40amd.com%7Cd89a2e71a6204428008908d99e40368f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637714820908943450%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wOmavKInLZrl3Qge2N83kgMh2dATo4aUH%2BW6QrPvL30%3D&reserved=0 Bug: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Fdrm%2Famd%2F-%2Fissues%2F1770&data=04%7C01%7CJames.Zhu%40amd.com%7Cd89a2e71a6204428008908d99e40368f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637714820908943450%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=k3GJBSFKw8FJhGs9Urpm8PmFPzN7m0LFl5p7Wv1FfGY%3D&reserved=0 Alex > --- > drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > index 7677ced16a27..be26c4016ade 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c > @@ -1031,9 +1031,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, > > svm_migrate_init(kfd->adev); > > - if(kgd2kfd_resume_iommu(kfd)) > - goto device_iommu_error; > - > if (kfd_resume(kfd)) > goto kfd_resume_error; > > -- > 2.25.1 > [-- Attachment #2: Type: text/html, Size: 5646 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." 2021-11-02 21:00 ` Zhu, James @ 2021-11-02 21:41 ` Ken Moffat 0 siblings, 0 replies; 8+ messages in thread From: Ken Moffat @ 2021-11-02 21:41 UTC (permalink / raw) To: Zhu, James; +Cc: Alex Deucher, Deucher, Alexander, amd-gfx list, Zhang, Yifan On Tue, Nov 02, 2021 at 09:00:04PM +0000, Zhu, James wrote: > [AMD Official Use Only] > > > Hi Alex > > Sure, Let me check it can be merged into one patch. > > > Thanks & Best Regards! > > > James Zhu > Hi James, I'm trying to apply these to 5.15.0 (using the dry-run option of traditional patch, kernel source is from the tarball). the first one fails: Reversed (or previously applied) patch detected! Assume -R? [n] it will revert: Hunk #1 succeeded at 924 with fuzz 2 (offset -107 lines). In anything connected to the kernel, fuzz on a patch worries me. Should I apply this with patch -p1 -R ? For the second patch: checking file drivers/gpu/drm/amd/amdgpu/amdgpu_device.c Hunk #1 succeeded at 2432 (offset 34 lines). checking file drivers/gpu/drm/amd/amdkfd/kfd_device.c Hunk #1 succeeded at 924 with fuzz 2 (offset -107 lines). Again, note the fuzz in kfd_device.c. Using 'git apply --check' instead of 'patch' both patches report the same failure for kfd_device.c: error: patch failed: drivers/gpu/drm/amd/amdkfd/kfd_device.c:1031 error: drivers/gpu/drm/amd/amdkfd/kfd_device.c: patch does not apply ĸen -- Vetinari smiled. "Can you keep a secret, Mister Lipwig?" "Oh, yes, sir. I've kept lots." "Capital. And the point is, so can I. You do not need to know.” ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-11-03 16:44 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-02 19:23 [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." James Zhu 2021-11-02 19:23 ` [PATCH 2/2] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu 2021-11-03 3:53 ` Lazar, Lijo 2021-11-03 16:27 ` James Zhu 2021-11-03 16:44 ` Lazar, Lijo 2021-11-02 20:34 ` [PATCH 1/2] Revert "drm/amdkfd: fix boot failure when iommu is disabled in Picasso." Alex Deucher 2021-11-02 21:00 ` Zhu, James 2021-11-02 21:41 ` Ken Moffat
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.