mirror of https://gitee.com/openkylin/linux.git
drm/amd/powerplay: enable set_cpu_power_state task. (v2)
v2: integrate Jammy's crash fix Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
This commit is contained in:
parent
7fb72a1fc0
commit
73afe62101
|
@ -260,7 +260,7 @@ const struct action_chain disable_user_2d_performance_action_chain = {
|
||||||
static const pem_event_action *display_config_change_event[] = {
|
static const pem_event_action *display_config_change_event[] = {
|
||||||
/* countDisplayConfigurationChangeEventTasks, */
|
/* countDisplayConfigurationChangeEventTasks, */
|
||||||
unblock_adjust_power_state_tasks,
|
unblock_adjust_power_state_tasks,
|
||||||
/* setCPUPowerState,*/
|
set_cpu_power_state,
|
||||||
notify_hw_power_source_tasks,
|
notify_hw_power_source_tasks,
|
||||||
/* updateDALConfigurationTasks,
|
/* updateDALConfigurationTasks,
|
||||||
variBrightDisplayConfigurationChangeTasks, */
|
variBrightDisplayConfigurationChangeTasks, */
|
||||||
|
|
|
@ -403,3 +403,8 @@ const pem_event_action uninitialize_thermal_controller_tasks[] = {
|
||||||
pem_task_uninitialize_thermal_controller,
|
pem_task_uninitialize_thermal_controller,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const pem_event_action set_cpu_power_state[] = {
|
||||||
|
pem_task_set_cpu_power_state,
|
||||||
|
NULL
|
||||||
|
};
|
|
@ -96,4 +96,5 @@ extern const pem_event_action reset_boot_state_tasks[];
|
||||||
extern const pem_event_action create_new_user_performance_state_tasks[];
|
extern const pem_event_action create_new_user_performance_state_tasks[];
|
||||||
extern const pem_event_action initialize_thermal_controller_tasks[];
|
extern const pem_event_action initialize_thermal_controller_tasks[];
|
||||||
extern const pem_event_action uninitialize_thermal_controller_tasks[];
|
extern const pem_event_action uninitialize_thermal_controller_tasks[];
|
||||||
|
extern const pem_event_action set_cpu_power_state[];
|
||||||
#endif /* _EVENT_SUB_CHAINS_H_ */
|
#endif /* _EVENT_SUB_CHAINS_H_ */
|
||||||
|
|
|
@ -248,8 +248,7 @@ int pem_task_reset_display_phys_access(struct pp_eventmgr *eventmgr, struct pem_
|
||||||
|
|
||||||
int pem_task_set_cpu_power_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
|
int pem_task_set_cpu_power_state(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
|
||||||
{
|
{
|
||||||
/* TODO */
|
return phm_set_cpu_power_state(eventmgr->hwmgr);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*powersaving*/
|
/*powersaving*/
|
||||||
|
|
|
@ -260,3 +260,12 @@ int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
|
||||||
display_config->nb_pstate_switch_disable);
|
display_config->nb_pstate_switch_disable);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int phm_set_cpu_power_state(struct pp_hwmgr *hwmgr)
|
||||||
|
{
|
||||||
|
if (hwmgr != NULL && hwmgr->hwmgr_func->set_cpu_power_state != NULL)
|
||||||
|
return hwmgr->hwmgr_func->set_cpu_power_state(hwmgr);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -356,5 +356,7 @@ extern int phm_check_states_equal(struct pp_hwmgr *hwmgr,
|
||||||
extern int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
|
extern int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
|
||||||
const struct amd_pp_display_configuration *display_config);
|
const struct amd_pp_display_configuration *display_config);
|
||||||
|
|
||||||
|
extern int phm_set_cpu_power_state(struct pp_hwmgr *hwmgr);
|
||||||
|
|
||||||
#endif /* _HARDWARE_MANAGER_H_ */
|
#endif /* _HARDWARE_MANAGER_H_ */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue