drm/amd/powerplay: restore disabling power containment on Fiji (v2)
authorEric Huang <JinHuiEric.Huang@amd.com>
Mon, 13 Mar 2017 18:15:48 +0000 (14:15 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:54:14 +0000 (23:54 -0400)
Power containment will degrade performance in some compute tests.
Restore disabling it as before code refining in powerplay.

v2: only in the compute profile

Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

index 154d9a29749cd2a26482b021e45fea1c9d834c03..604ffea8375738b22eb1e73bab45edeed9d05992 100644 (file)
@@ -4576,6 +4576,13 @@ static int smu7_set_power_profile_state(struct pp_hwmgr *hwmgr,
        int tmp_result, result = 0;
        uint32_t sclk_mask = 0, mclk_mask = 0;
 
+       if (hwmgr->chip_id == CHIP_FIJI) {
+               if (request->type == AMD_PP_GFX_PROFILE)
+                       smu7_enable_power_containment(hwmgr);
+               else if (request->type == AMD_PP_COMPUTE_PROFILE)
+                       smu7_disable_power_containment(hwmgr);
+       }
+
        if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_AUTO)
                return -EINVAL;