drm/amd/powerplay: Use engine clock limit calculated by dal
authorVitaly Prosyak <vitaly.prosyak@amd.com>
Fri, 11 Dec 2015 18:38:58 +0000 (13:38 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 21:14:57 +0000 (16:14 -0500)
Use min required system clock calculated by dal

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c

index 031d255eb6fc0d572aff02f2b61b0d9a50b79214..cf037b7bb6d87c969bbac36f657d9d7f2bed751e 100644 (file)
@@ -715,7 +715,6 @@ static int cz_tf_update_sclk_limit(struct pp_hwmgr *hwmgr,
        unsigned long clock = 0;
        unsigned long level;
        unsigned long stable_pstate_sclk;
-       struct PP_Clocks clocks;
        unsigned long percentage;
 
        cz_hwmgr->sclk_dpm.soft_min_clk = table->entries[0].clk;
@@ -726,8 +725,9 @@ static int cz_tf_update_sclk_limit(struct pp_hwmgr *hwmgr,
        else
                cz_hwmgr->sclk_dpm.soft_max_clk  = table->entries[table->count - 1].clk;
 
-       /*PECI_GetMinClockSettings(pHwMgr->pPECI, &clocks);*/
-       clock = clocks.engineClock;
+       clock = hwmgr->display_config.min_core_set_clock;
+       if (clock == 0)
+               printk(KERN_ERR "[ powerplay ] min_core_set_clock not set\n");
 
        if (cz_hwmgr->sclk_dpm.hard_min_clk != clock) {
                cz_hwmgr->sclk_dpm.hard_min_clk = clock;