Commit e1c6f86a authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amd/powerplay: implement smu_notify_display_change function for smu11

add smu_notify_display_change function to send msg to smc to notify
display is changed.
Signed-off-by: default avatarKevin Wang <Kevin1.Wang@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2f25158d
...@@ -381,6 +381,10 @@ static int smu_smc_table_hw_init(struct smu_context *smu) ...@@ -381,6 +381,10 @@ static int smu_smc_table_hw_init(struct smu_context *smu)
if (ret) if (ret)
return ret; return ret;
ret = smu_notify_display_change(smu);
if (ret)
return ret;
/* /*
* Set min deep sleep dce fclk with bootup value from vbios via * Set min deep sleep dce fclk with bootup value from vbios via
* SetMinDeepSleepDcefclk MSG. * SetMinDeepSleepDcefclk MSG.
......
...@@ -241,6 +241,7 @@ struct smu_funcs ...@@ -241,6 +241,7 @@ struct smu_funcs
int (*get_enabled_mask)(struct smu_context *smu, uint32_t *feature_mask, uint32_t num); int (*get_enabled_mask)(struct smu_context *smu, uint32_t *feature_mask, uint32_t num);
int (*enable_all_mask)(struct smu_context *smu); int (*enable_all_mask)(struct smu_context *smu);
int (*disable_all_mask)(struct smu_context *smu); int (*disable_all_mask)(struct smu_context *smu);
int (*notify_display_change)(struct smu_context *smu);
}; };
...@@ -304,6 +305,8 @@ struct smu_funcs ...@@ -304,6 +305,8 @@ struct smu_funcs
((smu)->funcs->enable_all_mask? (smu)->funcs->enable_all_mask((smu)) : 0) ((smu)->funcs->enable_all_mask? (smu)->funcs->enable_all_mask((smu)) : 0)
#define smu_feature_disable_all(smu) \ #define smu_feature_disable_all(smu) \
((smu)->funcs->disable_all_mask? (smu)->funcs->disable_all_mask((smu)) : 0) ((smu)->funcs->disable_all_mask? (smu)->funcs->disable_all_mask((smu)) : 0)
#define smu_notify_display_change(smu) \
((smu)->funcs->notify_display_change? (smu)->funcs->notify_display_change((smu)) : 0)
#define smu_store_powerplay_table(smu) \ #define smu_store_powerplay_table(smu) \
((smu)->ppt_funcs->store_powerplay_table ? (smu)->ppt_funcs->store_powerplay_table((smu)) : 0) ((smu)->ppt_funcs->store_powerplay_table ? (smu)->ppt_funcs->store_powerplay_table((smu)) : 0)
#define smu_check_powerplay_table(smu) \ #define smu_check_powerplay_table(smu) \
......
...@@ -760,6 +760,16 @@ static int smu_v11_0_disable_all_mask(struct smu_context *smu) ...@@ -760,6 +760,16 @@ static int smu_v11_0_disable_all_mask(struct smu_context *smu)
return ret; return ret;
} }
static int smu_v11_0_notify_display_change(struct smu_context *smu)
{
int ret = 0;
if (smu_feature_is_enabled(smu, FEATURE_DPM_UCLK_BIT))
ret = smu_send_smc_msg_with_param(smu, SMU_MSG_SetUclkFastSwitch, 1);
return ret;
}
static const struct smu_funcs smu_v11_0_funcs = { static const struct smu_funcs smu_v11_0_funcs = {
.init_microcode = smu_v11_0_init_microcode, .init_microcode = smu_v11_0_init_microcode,
.load_microcode = smu_v11_0_load_microcode, .load_microcode = smu_v11_0_load_microcode,
...@@ -787,6 +797,7 @@ static const struct smu_funcs smu_v11_0_funcs = { ...@@ -787,6 +797,7 @@ static const struct smu_funcs smu_v11_0_funcs = {
.get_enabled_mask = smu_v11_0_get_enabled_mask, .get_enabled_mask = smu_v11_0_get_enabled_mask,
.enable_all_mask = smu_v11_0_enable_all_mask, .enable_all_mask = smu_v11_0_enable_all_mask,
.disable_all_mask = smu_v11_0_disable_all_mask, .disable_all_mask = smu_v11_0_disable_all_mask,
.notify_display_change = smu_v11_0_notify_display_change,
}; };
void smu_v11_0_set_smu_funcs(struct smu_context *smu) void smu_v11_0_set_smu_funcs(struct smu_context *smu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment