Merge remote-tracking branch 'regmap/for-next'
[deliverable/linux.git] / drivers / gpu / drm / amd / powerplay / hwmgr / tonga_hwmgr.c
index c7dc111221c2f2766611cadf4417cd925e66d2fe..7f9ba7f15e19ffe6b4d85ddf98ea35b8b0bcea27 100644 (file)
@@ -22,7 +22,6 @@
  */
 #include <linux/module.h>
 #include <linux/slab.h>
-#include <linux/fb.h>
 #include "linux/delay.h"
 #include "pp_acpi.h"
 #include "hwmgr.h"
@@ -302,6 +301,8 @@ void tonga_initialize_dpm_defaults(struct pp_hwmgr *hwmgr)
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_DisableMemoryTransition);
 
+       tonga_initialize_power_tune_defaults(hwmgr);
+
        data->mclk_strobe_mode_threshold = 40000;
        data->mclk_stutter_mode_threshold = 30000;
        data->mclk_edc_enable_threshold = 40000;
@@ -2479,7 +2480,7 @@ static int tonga_populate_single_graphic_level(struct pp_hwmgr *hwmgr, uint32_t
        graphic_level->VoltageDownHyst = 0;
        graphic_level->PowerThrottle = 0;
 
-       threshold = engine_clock * data->fast_watemark_threshold / 100;
+       threshold = engine_clock * data->fast_watermark_threshold / 100;
 /*
        *get the DAL clock. do it in funture.
        PECI_GetMinClockSettings(hwmgr->peci, &minClocks);
@@ -2982,6 +2983,10 @@ int tonga_init_smc_table(struct pp_hwmgr *hwmgr)
        PP_ASSERT_WITH_CODE(0 == result,
                "Failed to initialize Boot Level!", return result;);
 
+       result = tonga_populate_bapm_parameters_in_dpm_table(hwmgr);
+       PP_ASSERT_WITH_CODE(result == 0,
+                       "Failed to populate BAPM Parameters!", return result);
+
        if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_ClockStretcher)) {
                result = tonga_populate_clock_stretcher_data_table(hwmgr);
@@ -4370,6 +4375,10 @@ int tonga_enable_dpm_tasks(struct pp_hwmgr *hwmgr)
        PP_ASSERT_WITH_CODE((0 == tmp_result),
                "Failed to initialize ARB table index!", result = tmp_result);
 
+       tmp_result = tonga_populate_pm_fuses(hwmgr);
+       PP_ASSERT_WITH_CODE((tmp_result == 0),
+                       "Failed to populate PM fuses!", result = tmp_result);
+
        tmp_result = tonga_populate_initial_mc_reg_table(hwmgr);
        PP_ASSERT_WITH_CODE((0 == tmp_result),
                "Failed to populate initialize MC Reg table!", result = tmp_result);
@@ -4388,6 +4397,18 @@ int tonga_enable_dpm_tasks(struct pp_hwmgr *hwmgr)
        PP_ASSERT_WITH_CODE((0 == tmp_result),
                "Failed to start DPM!", result = tmp_result);
 
+       tmp_result = tonga_enable_smc_cac(hwmgr);
+       PP_ASSERT_WITH_CODE((tmp_result == 0),
+                       "Failed to enable SMC CAC!", result = tmp_result);
+
+       tmp_result = tonga_enable_power_containment(hwmgr);
+       PP_ASSERT_WITH_CODE((tmp_result == 0),
+                       "Failed to enable power containment!", result = tmp_result);
+
+       tmp_result = tonga_power_control_set_level(hwmgr);
+       PP_ASSERT_WITH_CODE((tmp_result == 0),
+                       "Failed to power control set level!", result = tmp_result);
+
        return result;
 }
 
This page took 0.030879 seconds and 5 git commands to generate.