it is more reasonable to move smu post_init() from late_init() to hw_init() stage, beacuse the smu specific hw init should be done before call other ip block late_init funcs.
Signed-off-by: Yang Wang <kevinyang.w...@amd.com> --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index b140f6fc50f6..f113b1b1b925 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -891,12 +891,6 @@ static int smu_late_init(struct amdgpu_ip_block *ip_block) if (!smu->pm_enabled) return 0; - ret = smu_post_init(smu); - if (ret) { - dev_err(adev->dev, "Failed to post smu init!\n"); - return ret; - } - /* * Explicitly notify PMFW the power mode the system in. Since * the PMFW may boot the ASIC with a different mode. @@ -1957,6 +1951,12 @@ static int smu_hw_init(struct amdgpu_ip_block *ip_block) return ret; } + ret = smu_post_init(smu); + if (ret) { + dev_err(adev->dev, "Failed to post smu init!\n"); + return ret; + } + adev->pm.dpm_enabled = true; dev_info(adev->dev, "SMU is initialized successfully!\n"); -- 2.34.1