summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-08-17 15:48:30 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-08-19 12:28:38 -0400
commit2a702ccd9a79f6fc23fdb07a410a5f6533ac8f78 (patch)
treee3baa60d393436ed46d77f717f6a482f7c8431a3 /drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
parente9f11dc80a113f13731f0af883770b05b3d50509 (diff)
drm/amd/powerplay: enable power containment features for tonga.
v2: fix build error introduced when fix code style problems. 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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
index c7dc111221c2..e7c281f6dbc7 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
@@ -302,6 +302,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 +2481,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 +2984,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 +4376,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 +4398,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;
}