]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amd/powerplay: fix mclk not switching back after multi-head was disabled
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 14 Sep 2016 05:20:34 +0000 (13:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 11:02:06 +0000 (05:02 -0600)
commit 9716ebc38dfabe6c8e5e3c809e9f3c61dd3740f9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/powerplay/eventmgr/eventactionchains.c
drivers/gpu/drm/amd/powerplay/eventmgr/psm.c

index 635fc4b4818484c1741d1404024452382c8a5fcc..92b1178438755ab4e981dfa14741f62a3353da9f 100644 (file)
@@ -262,6 +262,8 @@ static const pem_event_action * const display_config_change_event[] = {
        unblock_adjust_power_state_tasks,
        set_cpu_power_state,
        notify_hw_power_source_tasks,
+       get_2d_performance_state_tasks,
+       set_performance_state_tasks,
        /* updateDALConfigurationTasks,
        variBrightDisplayConfigurationChangeTasks, */
        adjust_power_state_tasks,
index a46225c0fc012080105071fc4a1bf00cbc871c31..d6bee727497c29ef5a51daac816fc03175749d90 100644 (file)
@@ -100,11 +100,12 @@ int psm_adjust_power_state_dynamic(struct pp_eventmgr *eventmgr, bool skip)
        if (requested == NULL)
                return 0;
 
+       phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
+
        if (pcurrent == NULL || (0 != phm_check_states_equal(hwmgr, &pcurrent->hardware, &requested->hardware, &equal)))
                equal = false;
 
        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);
                hwmgr->current_ps = requested;
        }