]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/pp: Fix performance drop on Fiji
authorRex Zhu <Rex.Zhu@amd.com>
Thu, 10 May 2018 11:51:09 +0000 (19:51 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 May 2018 18:44:23 +0000 (13:44 -0500)
The performance drop if the default TDP more than 256 Watt

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c

index a264e0c35f459093ef2e7ba343936b5a0619b2a9..99b29ff45d91398d9735e2ae588488984f045b0e 100644 (file)
@@ -1042,12 +1042,10 @@ int smu7_set_power_limit(struct pp_hwmgr *hwmgr, uint32_t n)
 {
        struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
 
-       n = (n & 0xff) << 8;
-
        if (data->power_containment_features &
                        POWERCONTAINMENT_FEATURE_PkgPwrLimit)
                return smum_send_msg_to_smc_with_parameter(hwmgr,
-                               PPSMC_MSG_PkgPwrSetLimit, n);
+                               PPSMC_MSG_PkgPwrSetLimit, n<<8);
        return 0;
 }