Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu

2021-11-03 Thread Alex Deucher
On Tue, Nov 2, 2021 at 9:34 PM James Zhu  wrote:
>
> Remove duplicated kfd_resume_iommu which already runs
> in mdgpu_amdkfd_device_init.
>
> Signed-off-by: James Zhu 

Reviewed-by: Alex Deucher 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 
>  1 file changed, 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:
> --
> 2.25.1
>


Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu

2021-11-03 Thread Alex Deucher
On Wed, Nov 3, 2021 at 10:50 AM Alex Deucher  wrote:
>
>
>
> On Wed, Nov 3, 2021 at 10:34 AM Zhu, James  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 think this applies to 5.15 as well.  Only drm-next (5.16) needs this patch.

Alex

>
>
> 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
>>
>>
>>
>> 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 
>> Sent: Tuesday, November 2, 2021 10:01 PM
>> To: Zhu, James 
>> Cc: amd-gfx list ; Deucher, Alexander 
>> ; Zhang, Yifan ; James Zhu 
>> ; Ken Moffat 
>> Subject: Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu
>>
>> On Tue, Nov 2, 2021 at 9:34 PM James Zhu  wrote:
>> >
>> > Remove duplicated kfd_resume_iommu which already runs
>> > in mdgpu_amdkfd_device_init.
>> >
>> > Signed-off-by: James Zhu 
>>
>> 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=0
>>
>> Acked-by: Alex Deucher 
>>
>>
>> > ---
>> >  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 
>> >  1 file changed, 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:
>> > --
>> > 2.25.1
>> >


Re: [PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu

2021-11-02 Thread Alex Deucher
On Tue, Nov 2, 2021 at 9:34 PM James Zhu  wrote:
>
> Remove duplicated kfd_resume_iommu which already runs
> in mdgpu_amdkfd_device_init.
>
> Signed-off-by: James Zhu 

Once you get confirmation, please add:
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=214859
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1770

Acked-by: Alex Deucher 


> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 
>  1 file changed, 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:
> --
> 2.25.1
>


[PATCH] drm/amdgpu: remove duplicated kfd_resume_iommu

2021-11-02 Thread James Zhu
Remove duplicated kfd_resume_iommu which already runs
in mdgpu_amdkfd_device_init.

Signed-off-by: James Zhu 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 
 1 file changed, 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:
-- 
2.25.1