[PATCH 1/2] drm/amd/pm: move the dpm table setting back after featureenablement
Lazar, Lijo
lijo.lazar at amd.com
Mon Jun 16 03:44:13 UTC 2025
On 6/13/2025 8:12 PM, Kenneth Feng wrote:
> move the dpm table setting back after featureenablemend due to dependancy.
>
> Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
> ---
> drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> index 824fcc6dd32a..cf4ac3914b68 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
> @@ -1687,17 +1687,6 @@ static int smu_smc_hw_setup(struct smu_context *smu)
> }
> }
>
> - /*
> - * Set initialized values (get from vbios) to dpm tables context such as
> - * gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each
> - * type of clks.
> - */
> - ret = smu_set_default_dpm_table(smu);
> - if (ret) {
> - dev_err(adev->dev, "Failed to setup default dpm clock tables!\n");
> - return ret;
> - }
> -
> if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN5)
> pcie_gen = 4;
> else if (adev->pm.pcie_gen_mask & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN4)
> @@ -1739,6 +1728,17 @@ static int smu_smc_hw_setup(struct smu_context *smu)
> return ret;
> }
>
> + /*
> + * Set initialized values (get from vbios) to dpm tables context such as
> + * gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each
> + * type of clks.
> + */
> + ret = smu_set_default_dpm_table(smu);
> + if (ret) {
> + dev_err(adev->dev, "Failed to setup default dpm clock tables!\n");
> + return ret;
> + }
> +
As was in the original code, please move this after -
if (!smu_is_dpm_running(smu))
dev_info(adev->dev, "dpm has been disabled\n");
This point completes all the diagnostic messages related to DPM feature
enable stage. That helps to check if any issue happened before fetching
tables from firmware.
Thanks,
Lijo
> smu_init_xgmi_plpd_mode(smu);
>
> ret = smu_feature_get_enabled_mask(smu, &features_supported);
More information about the amd-gfx
mailing list