From d1da0d9a682fed8f49b1509eb371d889cd030abb Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Fri, 6 Oct 2017 12:17:16 +0800 Subject: [PATCH 1062/4131] drm/amd/powerplay: fix mclk can't switch on Tonga regresstion issue caused by commit 47047263c52779f1f3393c32e3e53661b53a372e ("drm/amd/powerplay: delete eventmgr related files.") Change-Id: Ib528f67dde834e552eba4fc845d3babbfdd28852 reviewed-by: Evan Quan Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 1 - drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c index 8770860..ee04336 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c @@ -202,7 +202,6 @@ int hwmgr_hw_fini(struct pp_instance *handle) phm_stop_thermal_controller(hwmgr); psm_set_boot_states(hwmgr); - phm_display_configuration_changed(hwmgr); psm_adjust_power_state_dynamic(hwmgr, false, NULL); phm_disable_dynamic_state_management(hwmgr); phm_disable_clock_power_gatings(hwmgr); diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c index 167cdc3..ffa44bb 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c @@ -224,6 +224,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip, if (skip) return 0; + phm_display_configuration_changed(hwmgr); + if (new_ps != NULL) requested = new_ps; else @@ -232,7 +234,6 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip, pcurrent = hwmgr->current_ps; phm_apply_state_adjust_rules(hwmgr, requested, pcurrent); - if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr, &pcurrent->hardware, &requested->hardware, &equal))) equal = false; @@ -241,6 +242,9 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip, phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware); memcpy(hwmgr->current_ps, hwmgr->request_ps, hwmgr->ps_size); } + + phm_notify_smc_display_config_after_ps_adjustment(hwmgr); + return 0; } -- 2.7.4