aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-09-20 21:50:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-09-26 22:09:09 -0400
commit0b2c0a12cbb444a4dfbd5bb531cd927a33235cd7 (patch)
tree871d66b62bb2e0dc8a48171847f96c3e52ebb411 /drivers/gpu/drm/amd
parentd498a6e1127b7cc8943582b7aea4c1fd170c56a5 (diff)
drm/amdgpu/powerplay: Move vega10_enable_smc_features
to vega10_smumgr.c. For consistency with other vega parts. Reviewed-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-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.c10
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h2
6 files changed, 15 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index ca9be583fb62..f32951f8c688 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -39,6 +39,7 @@
39#include "soc15_common.h" 39#include "soc15_common.h"
40#include "pppcielanes.h" 40#include "pppcielanes.h"
41#include "vega10_hwmgr.h" 41#include "vega10_hwmgr.h"
42#include "vega10_smumgr.h"
42#include "vega10_processpptables.h" 43#include "vega10_processpptables.h"
43#include "vega10_pptable.h" 44#include "vega10_pptable.h"
44#include "vega10_thermal.h" 45#include "vega10_thermal.h"
@@ -4940,16 +4941,6 @@ static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
4940 .get_performance_level = vega10_get_performance_level, 4941 .get_performance_level = vega10_get_performance_level,
4941}; 4942};
4942 4943
4943int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
4944 bool enable, uint32_t feature_mask)
4945{
4946 int msg = enable ? PPSMC_MSG_EnableSmuFeatures :
4947 PPSMC_MSG_DisableSmuFeatures;
4948
4949 return smum_send_msg_to_smc_with_parameter(hwmgr,
4950 msg, feature_mask);
4951}
4952
4953int vega10_hwmgr_init(struct pp_hwmgr *hwmgr) 4944int vega10_hwmgr_init(struct pp_hwmgr *hwmgr)
4954{ 4945{
4955 hwmgr->hwmgr_func = &vega10_hwmgr_funcs; 4946 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 339820da9e6a..89870556de1b 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h
@@ -441,7 +441,5 @@ int vega10_update_uvd_dpm(struct pp_hwmgr *hwmgr, bool bgate);
441int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate); 441int vega10_update_samu_dpm(struct pp_hwmgr *hwmgr, bool bgate);
442int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate); 442int vega10_update_acp_dpm(struct pp_hwmgr *hwmgr, bool bgate);
443int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable); 443int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable);
444int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
445 bool enable, uint32_t feature_mask);
446 444
447#endif /* _VEGA10_HWMGR_H_ */ 445#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 22364875a943..2d88abf97e7b 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c
@@ -23,6 +23,7 @@
23 23
24#include "hwmgr.h" 24#include "hwmgr.h"
25#include "vega10_hwmgr.h" 25#include "vega10_hwmgr.h"
26#include "vega10_smumgr.h"
26#include "vega10_powertune.h" 27#include "vega10_powertune.h"
27#include "vega10_ppsmc.h" 28#include "vega10_ppsmc.h"
28#include "vega10_inc.h" 29#include "vega10_inc.h"
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
index aa044c1955fe..407762b36901 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c
@@ -23,6 +23,7 @@
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"
26#include "vega10_ppsmc.h" 27#include "vega10_ppsmc.h"
27#include "vega10_inc.h" 28#include "vega10_inc.h"
28#include "soc15_common.h" 29#include "soc15_common.h"
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
index 5d19115f410c..8176d3371e70 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c
@@ -88,6 +88,16 @@ static int vega10_copy_table_to_smc(struct pp_hwmgr *hwmgr,
88 return 0; 88 return 0;
89} 89}
90 90
91int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
92 bool enable, uint32_t feature_mask)
93{
94 int msg = enable ? PPSMC_MSG_EnableSmuFeatures :
95 PPSMC_MSG_DisableSmuFeatures;
96
97 return smum_send_msg_to_smc_with_parameter(hwmgr,
98 msg, feature_mask);
99}
100
91static int vega10_get_smc_features(struct pp_hwmgr *hwmgr, 101static int vega10_get_smc_features(struct pp_hwmgr *hwmgr,
92 uint32_t *features_enabled) 102 uint32_t *features_enabled)
93{ 103{
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
index 424e868bc768..630c0ae4c03d 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.h
@@ -42,6 +42,8 @@ struct vega10_smumgr {
42 struct smu_table_array smu_tables; 42 struct smu_table_array smu_tables;
43}; 43};
44 44
45int vega10_enable_smc_features(struct pp_hwmgr *hwmgr,
46 bool enable, uint32_t feature_mask);
45 47
46#endif 48#endif
47 49