aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2022-03-31 18:10:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-05-04 09:57:45 -0400
commita1c30111de1c973751c654a64f6a99fb70ec03ca (patch)
tree7ad420913bca000ca332f2cdb19b35adf0d6d2c9
parentdrm/amd/pm: fix NULL pointer issue of amdgpu_smu_stb_debug_fs_init (diff)
downloadlinux-dev-a1c30111de1c973751c654a64f6a99fb70ec03ca.tar.xz
linux-dev-a1c30111de1c973751c654a64f6a99fb70ec03ca.zip
drm/amd/pm: move bootup values retrieving to ->sw_init
Firsrt of all, the operations involved is to interact with VBIOS. They are fully supported at ->sw_init phase. Secondly, the new mechanism to upload pptable to SMU is introduced. With the new mechanism, the pptable transferring has to be via PSP. That requires the pptable ucode(and necessary bootupp values retrieving) must be ready before ->hw_init phase of PSP. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 904d516c040b..07f44970bf63 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -1020,6 +1020,13 @@ static int smu_sw_init(void *handle)
return ret;
}
+ /* get boot_values from vbios to set revision, gfxclk, and etc. */
+ ret = smu_get_vbios_bootup_values(smu);
+ if (ret) {
+ dev_err(adev->dev, "Failed to get VBIOS boot clock values!\n");
+ return ret;
+ }
+
ret = smu_register_irq_handler(smu);
if (ret) {
dev_err(adev->dev, "Failed to register smc irq handler!\n");
@@ -1304,13 +1311,6 @@ static int smu_hw_init(void *handle)
if (!smu->pm_enabled)
return 0;
- /* get boot_values from vbios to set revision, gfxclk, and etc. */
- ret = smu_get_vbios_bootup_values(smu);
- if (ret) {
- dev_err(adev->dev, "Failed to get VBIOS boot clock values!\n");
- return ret;
- }
-
ret = smu_setup_pptable(smu);
if (ret) {
dev_err(adev->dev, "Failed to setup pptable!\n");