summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Feng <kenneth.feng@amd.com>2025-06-13 15:55:03 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-06-18 19:19:20 +0300
commit9dd1f152368244babc49c41ff65a86fe48f4534a (patch)
treeffe7c25875a364a4dab0a0a164eb3cf2a4160341
parent9a9e87d15297ce72507178e93cbb773510c061cd (diff)
downloadlinux-9dd1f152368244babc49c41ff65a86fe48f4534a.tar.xz
drm/amd/pm: move the dpm table setting back after featureenablement
move the dpm table setting back after featureenablemend due to dependancy. For SMUv13.0.6, there is no pptable. Those frequency tables are available through FW metrics and it needs DPM to be enabled. Signed-off-by: Kenneth Feng <kenneth.feng@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c22
1 files 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..0c9232009da9 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)
@@ -1753,6 +1742,17 @@ static int smu_smc_hw_setup(struct smu_context *smu)
if (!smu_is_dpm_running(smu))
dev_info(adev->dev, "dpm has been disabled\n");
+ /*
+ * 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;
+ }
+
ret = smu_get_thermal_temperature_range(smu);
if (ret) {
dev_err(adev->dev, "Failed to get thermal temperature ranges!\n");