Commit 4a0165f0 authored by Victor Skvortsov's avatar Victor Skvortsov Committed by Alex Deucher

drm/amdgpu: get xgmi info before ip_init

Driver needs to call get_xgmi_info() before ip_init
to determine whether it needs to handle a pending hive reset.
Signed-off-by: default avatarVictor Skvortsov <victor.skvortsov@amd.com>
Reviewed-by: default avatarDavid Nieto <david.nieto@amd.com>
Reviewed by: shaoyun.liu <Shaoyun.lui@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4aa325ae
...@@ -3577,6 +3577,13 @@ int amdgpu_device_init(struct amdgpu_device *adev, ...@@ -3577,6 +3577,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (r) if (r)
return 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)
return r;
}
/* enable PCIE atomic ops */ /* enable PCIE atomic ops */
if (amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev))
adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *) adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *)
......
...@@ -914,12 +914,6 @@ static int gmc_v10_0_sw_init(void *handle) ...@@ -914,12 +914,6 @@ static int gmc_v10_0_sw_init(void *handle)
return r; 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); r = gmc_v10_0_mc_init(adev);
if (r) if (r)
return r; return r;
......
...@@ -1628,12 +1628,6 @@ static int gmc_v9_0_sw_init(void *handle) ...@@ -1628,12 +1628,6 @@ static int gmc_v9_0_sw_init(void *handle)
} }
adev->need_swiotlb = drm_need_swiotlb(44); 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); r = gmc_v9_0_mc_init(adev);
if (r) if (r)
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment