diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1056-drm-amd-powerplay-fix-set-target-TDP-error-on-tonga-.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1056-drm-amd-powerplay-fix-set-target-TDP-error-on-tonga-.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1056-drm-amd-powerplay-fix-set-target-TDP-error-on-tonga-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1056-drm-amd-powerplay-fix-set-target-TDP-error-on-tonga-.patch new file mode 100644 index 00000000..c2f5900c --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1056-drm-amd-powerplay-fix-set-target-TDP-error-on-tonga-.patch @@ -0,0 +1,48 @@ +From e742143d17c77334a4e2fcb8c4a4867b45b8d505 Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Thu, 14 Sep 2017 09:10:41 +0800 +Subject: [PATCH 1056/4131] drm/amd/powerplay: fix set target TDP error on + tonga/iceland + +ConfigurableTDP do not exist from Fiji. +so only use in previous ASIC. + +Change-Id: Id20c41bd258fbbbaef6e4a8f4795f2a0b9ffb813 +Reviewed-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> +--- + drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 11 ++++++----- + 1 file 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 db6ca11..03fc422 100644 +--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c ++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c +@@ -948,7 +948,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; + +@@ -1019,10 +1018,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); + } + +-- +2.7.4 + |