summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay
diff options
context:
space:
mode:
authorRex Zhu2017-09-14 03:10:41 +0200
committerAlex Deucher2017-09-26 19:06:58 +0200
commit2a527680a112d6b230961e3714d370a2e369bda9 (patch)
treed1db88066e71ed1f76a9502ca8f69ca13fafb59f /drivers/gpu/drm/amd/powerplay
parentdrm/amd/powerplay: add CI asics support to smumgr (v3) (diff)
downloadkernel-qcow2-linux-2a527680a112d6b230961e3714d370a2e369bda9.tar.gz
kernel-qcow2-linux-2a527680a112d6b230961e3714d370a2e369bda9.tar.xz
kernel-qcow2-linux-2a527680a112d6b230961e3714d370a2e369bda9.zip
drm/amd/powerplay: fix set target TDP error on tonga/iceland
ConfigurableTDP do not exist from Fiji. so only use in previous ASIC. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
index 0f75af33e581..0fbaeb19a542 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c
@@ -905,7 +905,6 @@ int smu7_enable_power_containment(struct pp_hwmgr *hwmgr)
if (0 == smc_result) {
uint32_t default_limit =
(uint32_t)(cac_table->usMaximumPowerDeliveryLimit * 256);
-
data->power_containment_features |=
POWERCONTAINMENT_FEATURE_PkgPwrLimit;
@@ -976,10 +975,12 @@ int smu7_power_control_set_level(struct pp_hwmgr *hwmgr)
adjust_percent = hwmgr->platform_descriptor.TDPAdjustmentPolarity ?
hwmgr->platform_descriptor.TDPAdjustment :
(-1 * hwmgr->platform_descriptor.TDPAdjustment);
- /* SMC requested that target_tdp to be 7 bit fraction in DPM table
- * but message to be 8 bit fraction for messages
- */
- target_tdp = ((100 + adjust_percent) * (int)(cac_table->usTDP * 256)) / 100;
+
+ if (hwmgr->chip_id > CHIP_TONGA)
+ target_tdp = ((100 + adjust_percent) * (int)(cac_table->usTDP * 256)) / 100;
+ else
+ target_tdp = ((100 + adjust_percent) * (int)(cac_table->usConfigurableTDP * 256)) / 100;
+
result = smu7_set_overdriver_target_tdp(hwmgr, (uint32_t)target_tdp);
}