Skip to content

Commit ba2f099

Browse files
Evan Quanalexdeucher
authored andcommitted
drm/amd/pm: fulfill SMU13.0.7 cstate control interface
Fulfill the functionality for cstate control. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.0.x Signed-off-by: Alex Deucher <[email protected]>
1 parent 528c0e6 commit ba2f099

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] =
121121
MSG_MAP(Mode1Reset, PPSMC_MSG_Mode1Reset, 0),
122122
MSG_MAP(PrepareMp1ForUnload, PPSMC_MSG_PrepareMp1ForUnload, 0),
123123
MSG_MAP(SetMGpuFanBoostLimitRpm, PPSMC_MSG_SetMGpuFanBoostLimitRpm, 0),
124+
MSG_MAP(DFCstateControl, PPSMC_MSG_SetExternalClientDfCstateAllow, 0),
124125
};
125126

126127
static struct cmn2asic_mapping smu_v13_0_7_clk_map[SMU_CLK_COUNT] = {
@@ -1587,6 +1588,16 @@ static bool smu_v13_0_7_is_mode1_reset_supported(struct smu_context *smu)
15871588

15881589
return true;
15891590
}
1591+
1592+
static int smu_v13_0_7_set_df_cstate(struct smu_context *smu,
1593+
enum pp_df_cstate state)
1594+
{
1595+
return smu_cmn_send_smc_msg_with_param(smu,
1596+
SMU_MSG_DFCstateControl,
1597+
state,
1598+
NULL);
1599+
}
1600+
15901601
static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
15911602
.get_allowed_feature_mask = smu_v13_0_7_get_allowed_feature_mask,
15921603
.set_default_dpm_table = smu_v13_0_7_set_default_dpm_table,
@@ -1649,6 +1660,7 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
16491660
.mode1_reset_is_support = smu_v13_0_7_is_mode1_reset_supported,
16501661
.mode1_reset = smu_v13_0_mode1_reset,
16511662
.set_mp1_state = smu_v13_0_7_set_mp1_state,
1663+
.set_df_cstate = smu_v13_0_7_set_df_cstate,
16521664
};
16531665

16541666
void smu_v13_0_7_set_ppt_funcs(struct smu_context *smu)

0 commit comments

Comments
 (0)