Skip to content

Commit 2c79b0b

Browse files
Tim Huangalexdeucher
authored andcommitted
drm/amd/pm: wait for completion of the EnableGfxImu message
Wait for completion of sending the EnableGfxImu message when using the PSP FW loading for SMU ip v14.0. Signed-off-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 7c5fde5 commit 2c79b0b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353

5454
MODULE_FIRMWARE("amdgpu/smu_14_0_2.bin");
5555

56+
#define ENABLE_IMU_ARG_GFXOFF_ENABLE 1
57+
5658
int smu_v14_0_init_microcode(struct smu_context *smu)
5759
{
5860
struct amdgpu_device *adev = smu->adev;
@@ -1633,11 +1635,16 @@ int smu_v14_0_baco_exit(struct smu_context *smu)
16331635
int smu_v14_0_set_gfx_power_up_by_imu(struct smu_context *smu)
16341636
{
16351637
uint16_t index;
1638+
struct amdgpu_device *adev = smu->adev;
1639+
1640+
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1641+
return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_EnableGfxImu,
1642+
ENABLE_IMU_ARG_GFXOFF_ENABLE, NULL);
1643+
}
16361644

16371645
index = smu_cmn_to_asic_specific_index(smu, CMN2ASIC_MAPPING_MSG,
16381646
SMU_MSG_EnableGfxImu);
1639-
/* Param 1 to tell PMFW to enable GFXOFF feature */
1640-
return smu_cmn_send_msg_without_waiting(smu, index, 1);
1647+
return smu_cmn_send_msg_without_waiting(smu, index, ENABLE_IMU_ARG_GFXOFF_ENABLE);
16411648
}
16421649

16431650
int smu_v14_0_set_default_dpm_tables(struct smu_context *smu)

0 commit comments

Comments
 (0)