Skip to content

Commit

Permalink
drm/amdgpu: get xgmi info before ip_init
Browse files Browse the repository at this point in the history
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@amd.com>
Reviewed-by: David Nieto <david.nieto@amd.com>
Reviewed by: shaoyun.liu <Shaoyun.lui@amd.com>
(cherry picked from commit e108ade)

Change-Id: If1c9b59561e71ec41324f6615f09b505ef56b2ca
(cherry picked from commit c6376cd8d2b95fc2ab979d64e5f840ec96594605)
  • Loading branch information
Victor Skvortsov authored and Gavin Wan committed Feb 10, 2022
1 parent a8c392e commit 560d1bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -3656,6 +3656,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)
return r;
}

/* enable PCIE atomic ops */
if (amdgpu_sriov_vf(adev))
adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *)
Expand Down
6 changes: 0 additions & 6 deletions drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,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;
Expand Down

0 comments on commit 560d1bf

Please sign in to comment.