drm/amd/powerplay: fix mclk not switching back after multi-head was disabled

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
This commit is contained in:
Rex Zhu 2016-09-14 13:20:34 +08:00 committed by Alex Deucher
parent f2aba352a9
commit 9716ebc38d
2 changed files with 4 additions and 1 deletions

View File

@ -262,6 +262,8 @@ static const pem_event_action * const display_config_change_event[] = {
unblock_adjust_power_state_tasks, unblock_adjust_power_state_tasks,
set_cpu_power_state, set_cpu_power_state,
notify_hw_power_source_tasks, notify_hw_power_source_tasks,
get_2d_performance_state_tasks,
set_performance_state_tasks,
/* updateDALConfigurationTasks, /* updateDALConfigurationTasks,
variBrightDisplayConfigurationChangeTasks, */ variBrightDisplayConfigurationChangeTasks, */
adjust_power_state_tasks, adjust_power_state_tasks,

View File

@ -101,11 +101,12 @@ int psm_adjust_power_state_dynamic(struct pp_eventmgr *eventmgr, bool skip)
if (requested == NULL) if (requested == NULL)
return 0; return 0;
phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr, &pcurrent->hardware, &requested->hardware, &equal))) if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr, &pcurrent->hardware, &requested->hardware, &equal)))
equal = false; equal = false;
if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) { if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) {
phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware); phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size); memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size);
} }