RE: [PATCH v3 4/5] drm/amdgpu: get xgmi info before ip_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only]

I will fix the indent issue. There shouldn't be any conflicts between this patch and the xgmi init changes. We've run with those xgmi init patches applied on top of mainline-dkms-5.13 (where this change is already present) and found no issues.

Thanks,
Victor

-----Original Message-----
From: Alex Deucher <alexdeucher@xxxxxxxxx> 
Sent: Thursday, December 16, 2021 3:18 PM
To: Skvortsov, Victor <Victor.Skvortsov@xxxxxxx>
Cc: amd-gfx list <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Deng, Emily <Emily.Deng@xxxxxxx>; Liu, Monk <Monk.Liu@xxxxxxx>; Ming, Davis <Davis.Ming@xxxxxxx>; Liu, Shaoyun <Shaoyun.Liu@xxxxxxx>; Zhou, Peng Ju <PengJu.Zhou@xxxxxxx>; Chen, JingWen <JingWen.Chen2@xxxxxxx>; Chen, Horace <Horace.Chen@xxxxxxx>; Nieto, David M <David.Nieto@xxxxxxx>
Subject: Re: [PATCH v3 4/5] drm/amdgpu: get xgmi info before ip_init

[CAUTION: External Email]

On Thu, Dec 16, 2021 at 2:43 PM Victor Skvortsov <victor.skvortsov@xxxxxxx> wrote:
>
> Driver needs to call get_xgmi_info() before ip_init to determine 
> whether it needs to handle a pending hive reset.
>
> Signed-off-by: Victor Skvortsov <victor.skvortsov@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
>  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c     | 6 ------
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c      | 6 ------
>  3 files changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 5bd785cfc5ca..4fd370016834 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3576,6 +3576,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>         if (r)
>                 return r;
>
> +       /* Need to get xgmi info early to decide the reset behavior*/
> +       if (adev->gmc.xgmi.supported) {
> +               r = adev->gfxhub.funcs->get_xgmi_info(adev);
> +       if (r)

Indentation looks off here, please fix that.  Also, will this conflict with Shaoyun's xgmi init patch which may or may not have landed?
Other than that, these patches look pretty good to me.

Alex


> +                       return r;
> +       }
> +
>         /* enable PCIE atomic ops */
>         if (amdgpu_sriov_vf(adev))
>                 adev->have_atomics_support = ((struct 
> amd_sriov_msg_pf2vf_info *) diff --git 
> a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> index ae46eb35b3d7..3d5d47a799e3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
> @@ -914,12 +914,6 @@ static int gmc_v10_0_sw_init(void *handle)
>                 return r;
>         }
>
> -       if (adev->gmc.xgmi.supported) {
> -               r = adev->gfxhub.funcs->get_xgmi_info(adev);
> -               if (r)
> -                       return r;
> -       }
> -
>         r = gmc_v10_0_mc_init(adev);
>         if (r)
>                 return r;
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 2b86c63b032a..57f2729a7bd0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -1628,12 +1628,6 @@ static int gmc_v9_0_sw_init(void *handle)
>         }
>         adev->need_swiotlb = drm_need_swiotlb(44);
>
> -       if (adev->gmc.xgmi.supported) {
> -               r = adev->gfxhub.funcs->get_xgmi_info(adev);
> -               if (r)
> -                       return r;
> -       }
> -
>         r = gmc_v9_0_mc_init(adev);
>         if (r)
>                 return r;
> --
> 2.25.1
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux