@@ -120,6 +120,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] =
120120 MSG_MAP (Mode1Reset , PPSMC_MSG_Mode1Reset , 0 ),
121121 MSG_MAP (PrepareMp1ForUnload , PPSMC_MSG_PrepareMp1ForUnload , 0 ),
122122 MSG_MAP (DFCstateControl , PPSMC_MSG_SetExternalClientDfCstateAllow , 0 ),
123+ MSG_MAP (ArmD3 , PPSMC_MSG_ArmD3 , 0 ),
123124};
124125
125126static struct cmn2asic_mapping smu_v13_0_0_clk_map [SMU_CLK_COUNT ] = {
@@ -1566,6 +1567,31 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
15661567 NULL );
15671568}
15681569
1570+ static int smu_v13_0_0_baco_enter (struct smu_context * smu )
1571+ {
1572+ struct smu_baco_context * smu_baco = & smu -> smu_baco ;
1573+ struct amdgpu_device * adev = smu -> adev ;
1574+
1575+ if (adev -> in_runpm && smu_cmn_is_audio_func_enabled (adev ))
1576+ return smu_v13_0_baco_set_armd3_sequence (smu ,
1577+ smu_baco -> maco_support ? BACO_SEQ_BAMACO : BACO_SEQ_BACO );
1578+ else
1579+ return smu_v13_0_baco_enter (smu );
1580+ }
1581+
1582+ static int smu_v13_0_0_baco_exit (struct smu_context * smu )
1583+ {
1584+ struct amdgpu_device * adev = smu -> adev ;
1585+
1586+ if (adev -> in_runpm && smu_cmn_is_audio_func_enabled (adev )) {
1587+ /* Wait for PMFW handling for the Dstate change */
1588+ usleep_range (10000 , 11000 );
1589+ return smu_v13_0_baco_set_armd3_sequence (smu , BACO_SEQ_ULPS );
1590+ } else {
1591+ return smu_v13_0_baco_exit (smu );
1592+ }
1593+ }
1594+
15691595static bool smu_v13_0_0_is_mode1_reset_supported (struct smu_context * smu )
15701596{
15711597 struct amdgpu_device * adev = smu -> adev ;
@@ -1827,8 +1853,8 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
18271853 .baco_is_support = smu_v13_0_baco_is_support ,
18281854 .baco_get_state = smu_v13_0_baco_get_state ,
18291855 .baco_set_state = smu_v13_0_baco_set_state ,
1830- .baco_enter = smu_v13_0_baco_enter ,
1831- .baco_exit = smu_v13_0_baco_exit ,
1856+ .baco_enter = smu_v13_0_0_baco_enter ,
1857+ .baco_exit = smu_v13_0_0_baco_exit ,
18321858 .mode1_reset_is_support = smu_v13_0_0_is_mode1_reset_supported ,
18331859 .mode1_reset = smu_v13_0_mode1_reset ,
18341860 .set_mp1_state = smu_v13_0_0_set_mp1_state ,
0 commit comments