]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/powerplay: make CAC feature controlled by module parameter.
authorRex Zhu <Rex.Zhu@amd.com>
Thu, 27 Oct 2016 09:54:01 +0000 (17:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Nov 2016 15:20:54 +0000 (10:20 -0500)
use same module parameter with powercontainment

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

index 2ba7937d254576137daf0a4992a5299f4909a835..2ada52f54a47d8ad1b219653a4ad2e36b067585d 100644 (file)
@@ -692,13 +692,17 @@ int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr)
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_SclkDeepSleep);
 
-       if (amdgpu_powercontainment)
+       if (amdgpu_powercontainment) {
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                            PHM_PlatformCaps_PowerContainment);
-       else
+               phm_cap_set(hwmgr->platform_descriptor.platformCaps,
+                       PHM_PlatformCaps_CAC);
+       } else {
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                            PHM_PlatformCaps_PowerContainment);
-
+               phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
+                       PHM_PlatformCaps_CAC);
+       }
        hwmgr->feature_mask = amdgpu_pp_feature_mask;
 
        return 0;
@@ -733,9 +737,6 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                                                PHM_PlatformCaps_TCPRamping);
 
-       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                                                       PHM_PlatformCaps_CAC);
-
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                                                PHM_PlatformCaps_RegulatorHot);
 
@@ -765,8 +766,6 @@ int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_TablelessHardwareInterface);
 
-       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                       PHM_PlatformCaps_CAC);
        return 0;
 }
 
@@ -789,9 +788,6 @@ int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                         PHM_PlatformCaps_TablelessHardwareInterface);
 
-       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                       PHM_PlatformCaps_CAC);
-
        return 0;
 }
 
@@ -807,8 +803,6 @@ int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
                        PHM_PlatformCaps_TCPRamping);
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                         PHM_PlatformCaps_TablelessHardwareInterface);
-       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                       PHM_PlatformCaps_CAC);
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                    PHM_PlatformCaps_EVV);
        return 0;