瀏覽代碼

drm/amd/powerplay: use mask bit for deepsleep/power tune feature.

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>
Rex Zhu 8 年之前
父節點
當前提交
55ff548378
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 2 2
      drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
  2. 0 2
      drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

+ 2 - 2
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c

@@ -685,14 +685,14 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
 
 
 int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr)
 int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr)
 {
 {
-	if (amdgpu_sclk_deep_sleep_en)
+	if (amdgpu_pp_feature_mask & PP_SCLK_DEEP_SLEEP_MASK)
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SclkDeepSleep);
 			PHM_PlatformCaps_SclkDeepSleep);
 	else
 	else
 		phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 		phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SclkDeepSleep);
 			PHM_PlatformCaps_SclkDeepSleep);
 
 
-	if (amdgpu_powercontainment) {
+	if (amdgpu_pp_feature_mask & PP_POWER_CONTAINMENT_MASK) {
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 			    PHM_PlatformCaps_PowerContainment);
 			    PHM_PlatformCaps_PowerContainment);
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 		phm_cap_set(hwmgr->platform_descriptor.platformCaps,

+ 0 - 2
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

@@ -38,8 +38,6 @@ struct pp_hwmgr;
 struct phm_fan_speed_info;
 struct phm_fan_speed_info;
 struct pp_atomctrl_voltage_table;
 struct pp_atomctrl_voltage_table;
 
 
-extern int amdgpu_powercontainment;
-extern int amdgpu_sclk_deep_sleep_en;
 extern unsigned amdgpu_pp_feature_mask;
 extern unsigned amdgpu_pp_feature_mask;
 
 
 #define VOLTAGE_SCALE 4
 #define VOLTAGE_SCALE 4