drm/amdgpu: send msg to IMU for the front-door loading
authorXiaojian Du <Xiaojian.Du@amd.com>
Wed, 27 Jul 2022 06:40:21 +0000 (14:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Jul 2022 19:17:49 +0000 (15:17 -0400)
This patch will make SMU send msg to IMU for the front-door loading, it is
required by some ASICs.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com>
Reviewed-by: Tim Huang <Tim.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index 6d9b3c6af1646f90c2f2b9d9a76e220fd9d21108..7510d470b86439c2269c9470176054823c638103 100644 (file)
@@ -1361,6 +1361,15 @@ static int smu_hw_init(void *handle)
        }
 
        if (smu->is_apu) {
+               if ((smu->ppt_funcs->set_gfx_power_up_by_imu) &&
+                               likely(adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)) {
+                       ret = smu->ppt_funcs->set_gfx_power_up_by_imu(smu);
+                       if (ret) {
+                               dev_err(adev->dev, "Failed to Enable gfx imu!\n");
+                               return ret;
+                       }
+               }
+
                smu_dpm_set_vcn_enable(smu, true);
                smu_dpm_set_jpeg_enable(smu, true);
                smu_set_gfx_cgpg(smu, true);