drm/amd/powerplay: use mask bit for deepsleep/power tune feature.
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 2 Nov 2016 05:24:02 +0000 (13:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Nov 2016 15:21:00 +0000 (10:21 -0500)
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>
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

index 2ada52f54a47d8ad1b219653a4ad2e36b067585d..febee267ff7cac05307671ab8de7d01c1a00cdda 100644 (file)
@@ -685,14 +685,14 @@ void hwmgr_init_default_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_PlatformCaps_SclkDeepSleep);
        else
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_SclkDeepSleep);
 
-       if (amdgpu_powercontainment) {
+       if (amdgpu_pp_feature_mask & PP_POWER_CONTAINMENT_MASK) {
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                            PHM_PlatformCaps_PowerContainment);
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
index 36effa19abddceda09197ffb28b1460299ae7e81..a57410bf9f379d1f2bbf4f687647b731604d653f 100644 (file)
@@ -38,8 +38,6 @@ struct pp_hwmgr;
 struct phm_fan_speed_info;
 struct pp_atomctrl_voltage_table;
 
-extern int amdgpu_powercontainment;
-extern int amdgpu_sclk_deep_sleep_en;
 extern unsigned amdgpu_pp_feature_mask;
 
 #define VOLTAGE_SCALE 4