aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-03-16 03:26:15 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-03-19 14:35:37 -0400
commitc7d30b40a240d6433eb016990632c11e3e7dcc36 (patch)
tree601c2106669afa3db2b86474b937269159b9d777 /drivers/gpu/drm
parent3f9ca14a1d5d566ecc23718c1782cd9fa3713fc1 (diff)
drm/amd/pp: Clean up header file for Vega10
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c11
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h2
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c1
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c1
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c11
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h5
6 files changed, 13 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index d65a67a371c6..be002c035de1 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -28,7 +28,6 @@
28 28
29#include "hwmgr.h" 29#include "hwmgr.h"
30#include "amd_powerplay.h" 30#include "amd_powerplay.h"
31#include "vega10_smumgr.h"
32#include "hardwaremanager.h" 31#include "hardwaremanager.h"
33#include "ppatomfwctrl.h" 32#include "ppatomfwctrl.h"
34#include "atomfirmware.h" 33#include "atomfirmware.h"
@@ -5024,6 +5023,16 @@ static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
5024 .set_power_limit = vega10_set_power_limit, 5023 .set_power_limit = vega10_set_power_limit,
5025}; 5024};
5026 5025
5026int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
5027 bool enable, uint32_t feature_mask)
5028{
5029 int msg = enable ? PPSMC_MSG_EnableSmuFeatures :
5030 PPSMC_MSG_DisableSmuFeatures;
5031
5032 return smum_send_msg_to_smc_with_parameter(hwmgr,
5033 msg, feature_mask);
5034}
5035
5027int vega10_hwmgr_init(struct pp_hwmgr *hwmgr) 5036int vega10_hwmgr_init(struct pp_hwmgr *hwmgr)
5028{ 5037{
5029 hwmgr->hwmgr_func = &vega10_hwmgr_funcs; 5038 hwmgr->hwmgr_func = &vega10_hwmgr_funcs;
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h
index 8f6c2cb962da..5339ea1f3dce 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h
@@ -440,5 +440,7 @@ int vega10_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate);
440int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate); 440int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate);
441int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate); 441int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate);
442int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); 442int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable);
443int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
444 bool enable, uint32_t feature_mask);
443 445
444#endif /* _VEGA10_HWMGR_H_ */ 446#endif /* _VEGA10_HWMGR_H_ */
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c
index b1f74c7f0943..12a7da88d5f4 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c
@@ -24,7 +24,6 @@
24#include "hwmgr.h" 24#include "hwmgr.h"
25#include "vega10_hwmgr.h" 25#include "vega10_hwmgr.h"
26#include "vega10_powertune.h" 26#include "vega10_powertune.h"
27#include "vega10_smumgr.h"
28#include "vega10_ppsmc.h" 27#include "vega10_ppsmc.h"
29#include "vega10_inc.h" 28#include "vega10_inc.h"
30#include "pp_debug.h" 29#include "pp_debug.h"
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
index 0c1707a973f0..0147267306d3 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
@@ -23,7 +23,6 @@
23 23
24#include "vega10_thermal.h" 24#include "vega10_thermal.h"
25#include "vega10_hwmgr.h" 25#include "vega10_hwmgr.h"
26#include "vega10_smumgr.h"
27#include "vega10_ppsmc.h" 26#include "vega10_ppsmc.h"
28#include "vega10_inc.h" 27#include "vega10_inc.h"
29#include "pp_soc15.h" 28#include "pp_soc15.h"
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
index af848de008bf..1743bda2c41b 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
@@ -25,6 +25,7 @@
25#include "vega10_inc.h" 25#include "vega10_inc.h"
26#include "pp_soc15.h" 26#include "pp_soc15.h"
27#include "vega10_smumgr.h" 27#include "vega10_smumgr.h"
28#include "vega10_hwmgr.h"
28#include "vega10_ppsmc.h" 29#include "vega10_ppsmc.h"
29#include "smu9_driver_if.h" 30#include "smu9_driver_if.h"
30#include "ppatomctrl.h" 31#include "ppatomctrl.h"
@@ -238,16 +239,6 @@ static int vega10_copy_table_to_smc(struct pp_hwmgr *hwmgr,
238 return 0; 239 return 0;
239} 240}
240 241
241int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
242 bool enable, uint32_t feature_mask)
243{
244 int msg = enable ? PPSMC_MSG_EnableSmuFeatures :
245 PPSMC_MSG_DisableSmuFeatures;
246
247 return vega10_send_msg_to_smc_with_parameter(hwmgr,
248 msg, feature_mask);
249}
250
251static int vega10_get_smc_features(struct pp_hwmgr *hwmgr, 242static int vega10_get_smc_features(struct pp_hwmgr *hwmgr,
252 uint32_t *features_enabled) 243 uint32_t *features_enabled)
253{ 244{
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
index e8f8f78a9827..424e868bc768 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
@@ -23,8 +23,6 @@
23#ifndef _VEGA10_SMUMANAGER_H_ 23#ifndef _VEGA10_SMUMANAGER_H_
24#define _VEGA10_SMUMANAGER_H_ 24#define _VEGA10_SMUMANAGER_H_
25 25
26#include "vega10_hwmgr.h"
27
28#define MAX_SMU_TABLE 5 26#define MAX_SMU_TABLE 5
29 27
30struct smu_table_entry { 28struct smu_table_entry {
@@ -44,9 +42,6 @@ struct vega10_smumgr {
44 struct smu_table_array smu_tables; 42 struct smu_table_array smu_tables;
45}; 43};
46 44
47int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
48 bool enable, uint32_t feature_mask);
49
50 45
51#endif 46#endif
52 47