[Public] late_init is the right place to apply any late WA (after that there is no other opportunity). There are already multiple callbacks done during hw_init. Any other SOC specific thing can be done during one of them.
Thanks, Lijo -----Original Message----- From: Wang, Yang(Kevin) <kevinyang.w...@amd.com> Sent: Friday, September 12, 2025 2:57 PM To: Lazar, Lijo <lijo.la...@amd.com>; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amd/pm: move smu ppt->post_init() into smu_hw_init() stage [Public] >> There needs to be a specific callback to do SOC specific things during >> late_init stage. Presently post_init is providing that, I don't think that >> should be moved. @post_init: Helper function for asic specific workarounds. In the previous code, the "post_init" was mainly used to implement specific WA for smu. If you check these codes, it would be more reasonable to put them in the hw init stage. Best Regards, Kevin -----Original Message----- From: Lazar, Lijo <lijo.la...@amd.com> Sent: Friday, September 12, 2025 17:04 To: Wang, Yang(Kevin) <kevinyang.w...@amd.com>; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amd/pm: move smu ppt->post_init() into smu_hw_init() stage [Public] There needs to be a specific callback to do SOC specific things during late_init stage. Presently post_init is providing that, I don't think that should be moved. Thanks, Lijo -----Original Message----- From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> On Behalf Of Yang Wang Sent: Friday, September 12, 2025 1:38 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amd/pm: move smu ppt->post_init() into smu_hw_init() stage 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