aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch
new file mode 100644
index 00000000..828d7a98
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3068-drm-amd-powerplay-populate-the-hwmon-temp-range-as-p.patch
@@ -0,0 +1,44 @@
+From b4430a631bc38743bf0b2f172a2975217a62c94e Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Tue, 2 Jan 2018 12:45:40 +0800
+Subject: [PATCH 3068/4131] drm/amd/powerplay: populate the hwmon temp range as
+ part of thermal controller setup
+
+Change-Id: I903ebb4d75ec0628e9720b6fee915c907e594613
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+index 297ec0d..84e1cb0 100644
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+@@ -227,14 +227,21 @@ int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, const void *info)
+ */
+ int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)
+ {
++ int ret = 0;
+ struct PP_TemperatureRange range = {{TEMP_RANGE_MIN, TEMP_RANGE_MAX}};
+
++ if (hwmgr->hwmgr_func->get_thermal_temperature_range)
++ hwmgr->hwmgr_func->get_thermal_temperature_range(
++ hwmgr, &range);
++
+ if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+ PHM_PlatformCaps_ThermalController)
+ && hwmgr->hwmgr_func->start_thermal_controller != NULL)
+- return hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range);
++ ret = hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range);
+
+- return 0;
++ cgs_set_temperature_range(hwmgr->device, range.min, range.max);
++
++ return ret;
+ }
+
+
+--
+2.7.4
+