drm/amdgpu: remove duplicated kfd_resume_iommu
Subsystems (2)
PATCH 1/1 drm/amdgpu: remove duplicated kfd_resume_iommu
Remove duplicated kfd_resume_iommu which already runs in mdgpu_amdkfd_device_init.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -4
@@ -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:
Signature · 1 line
2.25.1
Quoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>
Once you get confirmation, please add:
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1
Ken Moffat
Tested-byQuoted 6 lines · Alex Deucher
Quoted 4 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.
Quoted 9 lines
Quoted 1 line
Signed-off-by James Zhu <[email protected]>Once you get confirmation, please add: Bug:
https://bugzilla.kernel.org/show_bug.cgi?id=214859 Bug:
https://gitlab.freedesktop.org/drm/amd/-/issues/1770Acked-by Alex Deucher <[email protected]>
I see those were both for 5.14.15, on my 5.14 kernels I have not moved beyond 5.14.12 so I've dodged the bullet on those. And on my 2500u which I think is a Raven, 5.15.0-rc7 was ok.
On the picasso, this applies to 5.15.0 with an offset of 34 lines (no fuzz) and solves the problem. Thanks.
If it is any use,
Quoted 22 lines
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1
Signature · 3 lines
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.”
Zhu, James
Acked-by Alex Deucher[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move iommu_resume before ip init/resume" which overwrote afd1818 caused the issue again.
714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move iommu_resume before ip init/resume
afd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move iommu_resume before ip init/resume
[cid:56660919-2db3-4617-93fe-73404cd29433]
So, do we just discard this patch, and revert 714d9e4 and f02abeb?
Thanks & Best Regards!
James Zhu
________________________________
From: Alex Deucher <[email protected]>
Sent: Tuesday, November 2, 2021 10:01 PM
To: Zhu, James <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu
Quoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>
Once you get confirmation, please add:
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1
Quoted 9 lines · James
[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
I'll do that for stable.
Quoted 8 lines
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move
iommu_resumebefore ip init/resume" which overwrote afd1818 caused the issue again.714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move
iommu_resumebefore ip init/resumeafd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
Quoted 8 lines
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move
iommu_resumebefore ip init/resumeSo, do we just discard this patch, and revert 714d9e4 and f02abeb?
I'll do that for 5.15+
Thanks for sorting this out.
Alex
Quoted 55 lines
Thanks & Best Regards!
James Zhu
------------------------------
*From:* Alex Deucher <[email protected]>
*Sent:* Tuesday, November 2, 2021 10:01 PM
*To:* Zhu, James <[email protected]>
*Cc:* amd-gfx list <[email protected]>; Deucher, Alexander < [email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]> *Subject:* Re: [PATCH] drm/amdgpu: remove duplicatedkfd_resume_iommuQuoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>Once you get confirmation, please add:
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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208277821%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a6WyuNGhOU5OT3J8GQtXSQ3O5r942D2p%2BbruFUncT0E%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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208287813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E1MFXdprEaldLux2AoXNEeDWL5E85WFv8CrfZODTa%2F4%3D&reserved=0Acked-by Alex Deucher <[email protected]>Review
Quoted 5 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.cdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_ip_init(struct
Quoted 4 lines
index
e56bc925afcf..f77823ce7ae8100644drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -2398,10 +2398,6 @@ static int amdgpu_device_ip_init(struct
amdgpu_device*adev)Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5if (!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: --2.25.1
Reverting 714d9e4 and f02abeb results in this diff which is more than this patch does. Is that correct or should I just use your patch?
Alex
(quoted diff) +0 -0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e56bc925afcf..70540712ff2d 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -2360,6 +2360,10 @@ static int amdgpu_device_ip_init(struct
amdgpu_device *adev)
if (r)
goto init_failed;+ r = amdgpu_amdkfd_resume_iommu(adev);
+ if (r)
+ goto init_failed;
+
r = amdgpu_device_ip_hw_init_phase1(adev);
if (r)
goto init_failed;
@@ -2398,10 +2402,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:
@@ -3119,10 +3119,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
{
int r;- r = amdgpu_amdkfd_resume_iommu(adev);
- if (r)
- return r;
-
r = amdgpu_device_ip_resume_phase1(adev);
if (r)
return r;
@@ -4595,10 +4591,6 @@ int amdgpu_do_asic_reset(struct list_head
*device_list_handle,
dev_warn(tmp_adev->dev, "asic atom init
failed!");
} else {
dev_info(tmp_adev->dev, "GPU resetsucceeded, trying to resume\n");
- r = amdgpu_amdkfd_resume_iommu(tmp_adev);
- if (r)
- goto out;
-
r =
amdgpu_device_ip_resume_phase1(tmp_adev);
if (r)
goto out;Quoted 96 lines · Alex Deucher
Quoted 9 lines · James
[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
I'll do that for stable.
Quoted 8 lines
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move
iommu_resumebefore ip init/resume" which overwrote afd1818 caused the issue again.714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move
iommu_resumebefore ip init/resumeafd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
Quoted 8 lines
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move
iommu_resumebefore ip init/resumeSo, do we just discard this patch, and revert 714d9e4 and f02abeb?
I'll do that for 5.15+
Thanks for sorting this out.
Alex
Quoted 55 lines
Thanks & Best Regards!
James Zhu
------------------------------
*From:* Alex Deucher <[email protected]>
*Sent:* Tuesday, November 2, 2021 10:01 PM
*To:* Zhu, James <[email protected]>
*Cc:* amd-gfx list <[email protected]>; Deucher, Alexander < [email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]> *Subject:* Re: [PATCH] drm/amdgpu: remove duplicatedkfd_resume_iommuQuoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>Once you get confirmation, please add:
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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208277821%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a6WyuNGhOU5OT3J8GQtXSQ3O5r942D2p%2BbruFUncT0E%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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208287813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E1MFXdprEaldLux2AoXNEeDWL5E85WFv8CrfZODTa%2F4%3D&reserved=0Acked-by Alex Deucher <[email protected]>Review
Quoted 5 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.cdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_ip_init(struct
Quoted 4 lines
index
e56bc925afcf..f77823ce7ae8100644drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -2398,10 +2398,6 @@ static int amdgpu_device_ip_init(struct
amdgpu_device*adev)Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5if (!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: --2.25.1
Zhu, James
Acked-by Alex Deucher[AMD Official Use Only]
Hi Alex,
The following two patches were introduced for [email protected]
714d9e4 drm/amdgpu: init iommu after amdkfd device init f02abeb drm/amdgpu: move iommu_resume before ip init/resume
after commit 970eae15600a883e4ad27dd0757b18871cc983ab
Merge: 27f4432 3906fe9 BackMerge tag 'v5.15-rc7' into drm-next,
It became redundant and overwrote afd1818.
I saw that you just submit (afd1818) "[PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso" to [email protected].
I checked that if we re-applied afd1818 on current drm-next, it did the same thing as my patch after auto-merged.
I am wondering if BackMerge stable into drm-next in the future will correct current break.
For the above situation, I am not sure what is the proper way to fix this break.
Please let me know your final decision with all these information.
Thanks & Best Regards!
James Zhu
________________________________
From: Alex Deucher <[email protected]>
Sent: Wednesday, November 3, 2021 11:03 AM
To: Zhu, James <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu
Reverting 714d9e4 and f02abeb results in this diff which is more than this patch does. Is that correct or should I just use your patch?
Alex
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -12
@@ -2360,6 +2360,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)if (r) goto init_failed; + r =amdgpu_amdkfd_resume_iommu (adev); +if (r) + goto init_failed; + r =amdgpu_device_ip_hw_init_phase1 (adev);if (r) goto init_failed;
@@ -2398,10 +2402,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:
@@ -3119,10 +3119,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev) {int r; - r =amdgpu_amdkfd_resume_iommu (adev); -if (r) -return r; - r =amdgpu_device_ip_resume_phase1 (adev);if (r)return r;
@@ -4595,10 +4591,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,dev_warn (tmp_adev->dev,"asic atom init failed!" ); }else {dev_info (tmp_adev->dev,"GPU reset succeeded, trying to resume\n" ); - r =amdgpu_amdkfd_resume_iommu (tmp_adev); -if (r) - goto out; - r =amdgpu_device_ip_resume_phase1 (tmp_adev);if (r) goto out;
On Wed, Nov 3, 2021 at 10:50 AM Alex Deucher <[email protected]<mailto:[email protected]>> wrote:
On Wed, Nov 3, 2021 at 10:34 AM Zhu, James <[email protected]<mailto:[email protected]>> wrote:
[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
I'll do that for stable.
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move iommu_resume before ip init/resume" which overwrote afd1818 caused the issue again.
714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move iommu_resume before ip init/resume
afd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move iommu_resume before ip init/resume
[cid:17ce6464fcfcb971f161]
So, do we just discard this patch, and revert 714d9e4 and f02abeb?
I'll do that for 5.15+
Thanks for sorting this out.
Alex
Thanks & Best Regards!
James Zhu
________________________________
From: Alex Deucher <[email protected]<mailto:[email protected]>>
Sent: Tuesday, November 2, 2021 10:01 PM
To: Zhu, James <[email protected]<mailto:[email protected]>>
Cc: amd-gfx list <[email protected]<mailto:[email protected]>>; Deucher, Alexander <[email protected]<mailto:[email protected]>>; Zhang, Yifan <[email protected]<mailto:[email protected]>>; James Zhu <[email protected]<mailto:[email protected]>>; Ken Moffat <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu
Quoted 5 lines · On Tue, Nov 2, 2021 at 9:34 PM James Zhu…
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]<mailto:[email protected]>>
Once you get confirmation, please add:
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1
I think just applying your patch is fine for drm-next (i'll take care of that). For 5.14.x and 5.15.x, we can just cherry-pick afd1818.
Alex
Quoted 205 lines · James
[AMD Official Use Only]
Hi Alex,
The following two patches were introduced for [email protected]
714d9e4 drm/amdgpu: init iommu after amdkfd device init f02abeb drm/amdgpu: move
iommu_resumebefore ip init/resumeafter commit
970eae15600a883e4ad27dd0757b18871cc983ab
Merge: 27f4432 3906fe9 BackMerge tag 'v5.15-rc7' into drm-next,
It became redundant and overwrote afd1818.I saw that you just submit (afd1818) "[PATCH] drm/amdkfd: fix boot failure when iommu is disabled in Picasso" to [email protected].
I checked that if we re-applied afd1818 on current drm-next, it did the same thing as my patch after auto-merged.
I am wondering if BackMerge stable into drm-next in the future will correct current break.
For the above situation, I am not sure what is the proper way to fix this break.
Please let me know your final decision with all these information.
Thanks & Best Regards!
James Zhu
------------------------------
*From:* Alex Deucher <[email protected]>
*Sent:* Wednesday, November 3, 2021 11:03 AM
*To:* Zhu, James <[email protected]>
*Cc:* amd-gfx list <[email protected]>; Deucher, Alexander < [email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]> *Subject:* Re: [PATCH] drm/amdgpu: remove duplicatedkfd_resume_iommuReverting 714d9e4 and f02abeb results in this diff which is more than this patch does. Is that correct or should I just use your patch?
Alex
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4
-0@@ -2360,6 +2360,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)if (r) goto init_failed; + r =amdgpu_amdkfd_resume_iommu (adev); +if (r) + goto init_failed; + r =amdgpu_device_ip_hw_init_phase1 (adev);if (r)goto init_failed;drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-4@@ -2398,10 +2402,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:drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-4@@ -3119,10 +3119,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev) {int r; - r =amdgpu_amdkfd_resume_iommu (adev); -if (r) -return r; - r =amdgpu_device_ip_resume_phase1 (adev);if (r)return r;drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-4@@ -4595,10 +4591,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,dev_warn (tmp_adev->dev,"asic atom init failed!"); } else { dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n"); - r = amdgpu_amdkfd_resume_iommu(tmp_adev); -if (r) - goto out; -r = amdgpu_device_ip_resume_phase1(tmp_adev); if (r) goto out;On Wed, Nov 3, 2021 at 10:50 AM Alex Deucher <[email protected]> wrote:
On Wed, Nov 3, 2021 at 10:34 AM Zhu, James <[email protected]> wrote:
[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
I'll do that for stable.
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move
iommu_resumebefore ip init/resume" which overwrote afd1818 caused the issue again.714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move
iommu_resumebefore ip init/resumeafd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move
iommu_resumebefore ip init/resumeSo, do we just discard this patch, and revert 714d9e4 and f02abeb?
I'll do that for 5.15+
Thanks for sorting this out.
Alex
Thanks & Best Regards!
James Zhu
------------------------------
*From:* Alex Deucher <[email protected]>
*Sent:* Tuesday, November 2, 2021 10:01 PM
*To:* Zhu, James <[email protected]>
*Cc:* amd-gfx list <[email protected]>; Deucher, Alexander < [email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]> *Subject:* Re: [PATCH] drm/amdgpu: remove duplicatedkfd_resume_iommuQuoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>Once you get confirmation, please add:
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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208277821%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=a6WyuNGhOU5OT3J8GQtXSQ3O5r942D2p%2BbruFUncT0E%3D&reserved=0
<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%7C67f2c85612f7475d0dd008d99edb1fef%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715486249968500%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WhxYtNqFSoeWcuJSbJCCl99VSdd3XyHBVzjbpR3nx7g%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%7C8662c25150e94d9d664708d99e6deb2b%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715017208287813%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=E1MFXdprEaldLux2AoXNEeDWL5E85WFv8CrfZODTa%2F4%3D&reserved=0
<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%7C67f2c85612f7475d0dd008d99edb1fef%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637715486249978500%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hX2U%2BcWp%2BEinTjxptnx0zExc%2Fy3lbFUYgHT2JDdUY0g%3D&reserved=0>Acked-by Alex Deucher <[email protected]>Review
Quoted 5 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.cdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_ip_init(struct
Quoted 4 lines
index
e56bc925afcf..f77823ce7ae8100644drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -2398,10 +2398,6 @@ static int amdgpu_device_ip_init(struct
amdgpu_device*adev)Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5if (!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: --2.25.1
Quoted 5 lines · Alex Deucher
I think just applying your patch is fine for drm-next (i'll take care of that). For 5.14.x and 5.15.x, we can just cherry-pick afd1818.
Alex
I can confirm that both 5.14.17-rc1 and 5.15.1-rc1 work on my Picasso 3400G. Thanks for everyone's efforts.
ĸen
Signature · 3 lines
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.”
Quoted 5 lines · Alex Deucher
Quoted 1 line · James
Quoted 8 lines
Quoted 8 lines
[AMD Official Use Only]
Hi Alex,
Finally figured out the root cause for this broken,
Linux 5.14.15 + afd1818 can fix the issue.
I think this applies to 5.15 as well. Only drm-next (5.16) needs this patch.
Alex
Quoted 78 lines
I'll do that for stable.
Quoted 9 lines
Linux 5.15rc7 re-apply "init iommu after amdkfd device init" and "move
iommu_resumebefore ip init/resume" which overwrote afd1818 caused the issue again.714d9e4 drm/amdgpu: init iommu after amdkfd device init
f02abeb drm/amdgpu: move
iommu_resumebefore ip init/resumeafd1818 drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
Quoted 7 lines
286826d drm/amdgpu: init iommu after amdkfd device init
9cec53c drm/amdgpu: move
iommu_resumebefore ip init/resumeSo, do we just discard this patch, and revert 714d9e4 and f02abeb?
I'll do that for 5.15+
Thanks for sorting this out.
Alex
Quoted 50 lines
Thanks & Best Regards!
James Zhu
________________________________
From: Alex Deucher <[email protected]>
Sent: Tuesday, November 2, 2021 10:01 PM
To: Zhu, James <[email protected]>
Cc: amd-gfx list <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Yifan <[email protected]>; James Zhu <[email protected]>; Ken Moffat <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: remove duplicatedkfd_resume_iommuQuoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>Once you get confirmation, please add:
Acked-by Alex Deucher <[email protected]>Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1
Quoted 5 lines · James Zhu
Remove duplicated
kfd_resume_iommuwhich already runs inmdgpu_amdkfd_device_init.Signed-off-by James Zhu <[email protected]>
Quoted 22 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ---- 1 file changed, 4 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-5@@ -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: --2.25.1